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.20
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.20.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b6692cecd4828e4fa2ef4e65cf9a022527fa7f26b033edbb43b7599a41ed417 |
|
MD5 | d4a5b351108527a4a44bf60d734442e4 |
|
BLAKE2b-256 | 45bc25c374518626724a5a8efb75b49b2931a4f50caaffc0d1b1d0f76ab6417a |
Close
Hashes for streaminghub_pydfds-0.1.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1bf4af2f68b8a347d716672e480ceff94f7a893be1fda053ec6d3be42dc9d0d |
|
MD5 | 68a20c68f22ede5e10b72fb5d96da765 |
|
BLAKE2b-256 | 2ea9a8f75b76b5a4e558fb05c85babb4aacb65289faf00c443add186452a81f6 |