Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement file downloading under g3pylib.recordings.recording #92

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

albertna
Copy link
Mannequin

@albertna albertna mannequin commented Jul 19, 2023

Implement Recording.download_files() that downloads all recording files and metadata files to a specified local directory.

Resolves #90.


# workaround for making subsequent aiohttp clientsessions
# TODO: find a more appropriate solution
await asyncio.sleep(0.5)
Copy link
Mannequin Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a workaround to #91.

# decode returned string if it is base64 encoded, otherwise write it raw
try:
value = base64.b64decode(encoded_value).decode()
except ValueError:
Copy link
Mannequin Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that the default metadata like HuSerial, RuSerial and RuVersion are base64-encoded as described in the developer guide, but custom ones, like the ones tests/api_components/test_recording.py::test_meta_data created, are plain text. Is this intended behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download Recordings
1 participant