Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.9.4 (2025-05-24)

### Changes

- Add optional parameter to download resolved environments through file download.

## 0.9.3 (2025-05-13)

### Changes
Expand Down
2 changes: 1 addition & 1 deletion python/mujinwebstackclient/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.9.3'
__version__ = '0.9.4'

# Do not forget to update CHANGELOG.md

7 changes: 5 additions & 2 deletions python/mujinwebstackclient/webstackclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,15 +778,18 @@ def FileExists(self, path, timeout=5):
raise WebstackClientError(_('Failed to check file existence, status code is %d') % response.status_code, response=response)
return response.status_code != 404

def DownloadFile(self, filename, ifmodifiedsince=None, timeout=5):
def DownloadFile(self, filename, ifmodifiedsince=None, resolveReferences=False, timeout=5):
"""Downloads a file given filename

:return: A streaming response
"""
headers = {}
if ifmodifiedsince:
headers['If-Modified-Since'] = _FormatHTTPDate(ifmodifiedsince)
response = self._webclient.Request('GET', u'/u/%s/%s' % (self.controllerusername, filename), headers=headers, stream=True, timeout=timeout)
params = {
'resolveReferences': 'true' if resolveReferences else 'false',
}
response = self._webclient.Request('GET', u'/u/%s/%s' % (self.controllerusername, filename), params=params, headers=headers, stream=True, timeout=timeout)
if ifmodifiedsince and response.status_code == 304:
return response
if response.status_code != 200:
Expand Down