PyDFDS
PyDFDS is a parser for Data Flow Description Schema (DFDS) metadata, written using Python.
Installation
pip install streaminghub-pydfds==0.1.40
Usage
from streaminghub_pydfds import Parser
from streaminghub_pydfds.typing import Collection, Stream
from util import restream_data
parser = Parser()
fp = "/path/to/collection.json"
collection = parser.get_collection_metadata(fp)
dataloader = collection.dataloader()
for attrs in dataloader.ls():
for stream_id, stream in collection.streams.items():
pass
attrs, data = dataloader.read(stream.attrs)
asyncio.create_task(replay_data(collection, stream))
return streams
Developer Guide
python -m venv ~/.virtualenvs/pydfds
source ~/.virtualenvs/pydfds/bin/activate
python -m pip install --upgrade pip-tools
pip-compile --strip-extras -o requirements.txt pyproject.toml
pip-compile --strip-extras --extra dev -o requirements.dev.txt pyproject.toml
pip-sync requirements.txt requirements.dev.txt
bumpver update --patch
python -m build
python -m twine check dist/*
python -m twine upload -r testpypi dist/*
python -m twine upload dist/*