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.19
Usage
from dfds import Parser
from dfds.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 -o requirements.txt pyproject.toml
pip-compile --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
Built Distribution
Close
Hashes for streaminghub-pydfds-0.1.19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87819a2dd900dd9cb360313aac7c8872c822abc3e9466d50f30344cf2b4eaf5a |
|
MD5 | 799b1d1fbdb2e4802ba64707d9b5e9c5 |
|
BLAKE2b-256 | 474994d0b4178b4c575ba8dba459e102b5444af5bce32182b135e8a6b623c61b |
Close
Hashes for streaminghub_pydfds-0.1.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b9b5291d852ab106590a6814a17557760fb6ff664448602ba31854bb5cfa428 |
|
MD5 | ba0150af664c63e270f09c460e972a7d |
|
BLAKE2b-256 | a2b89835c510bbdaf32f1ebdff6a72db85508b06d44c319f848f80c81aba204e |