Parser for Data Flow Description Schema (DFDS) metadata
Project description
PyDFDS
PyDFDS is a parser for Data Flow Description Schema (DFDS) metadata, written using Python.
Installation
pip install streaminghub-pydfds==0.1.38
Usage
from streaminghub_pydfds import Parser
from streaminghub_pydfds.typing import Collection, Stream
from util import restream_data
# define a DFDS parser
parser = Parser()
# open a DFDS collection
fp = "/path/to/collection.json"
collection = parser.get_collection_metadata(fp)
dataloader = collection.dataloader()
# list all items in the collection
for attrs in dataloader.ls():
for stream_id, stream in collection.streams.items():
pass
# read an entire recording at once
attrs, data = dataloader.read(stream.attrs)
# or replay the recording as a stream
asyncio.create_task(replay_data(collection, stream))
return streams
Developer Guide
# create a virtual environment
python -m venv ~/.virtualenvs/pydfds
# activate virtual environment
source ~/.virtualenvs/pydfds/bin/activate
# install pip tools
python -m pip install --upgrade pip-tools
# generate requirements.txt
pip-compile --strip-extras -o requirements.txt pyproject.toml
pip-compile --strip-extras --extra dev -o requirements.dev.txt pyproject.toml
# install dependencies
pip-sync requirements.txt requirements.dev.txt
# update version (--patch or --minor or --major)
bumpver update --patch
# build package
python -m build
# check package
python -m twine check dist/*
# publish package (testpypi)
python -m twine upload -r testpypi dist/*
# publish package (pypi)
python -m twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streaminghub_pydfds-0.1.38.tar.gz
(10.7 kB
view hashes)
Built Distribution
Close
Hashes for streaminghub_pydfds-0.1.38.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c72c4b09f0748890fc978dd7229e741dd6041f437e8709d06cb17d649b996c0a |
|
MD5 | bba6bafa99ba3a9a0f36857d792f2e33 |
|
BLAKE2b-256 | 0514f7deac24eeb34a6c36d8e1a9a5d3e2613d77cbe366e25ab2409eec01abd3 |
Close
Hashes for streaminghub_pydfds-0.1.38-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 279f69f2cc18ce005a58121e035be7ecc892be6fa9e32042c5f199947073bac3 |
|
MD5 | 8cf5013ae57bcfe1fb2ceb5afc85bf6c |
|
BLAKE2b-256 | 570fd8656ba80fb8347b7b4d138f445abac2281b4e1e2739af4c6ef4af88765f |