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.36
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.36.tar.gz
(10.7 kB
view hashes)
Built Distribution
Close
Hashes for streaminghub_pydfds-0.1.36.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac1043a65bdcbd2a98af1d07e19f39f6c1535543f37ee04ee6554327a874298a |
|
MD5 | 3ce83881f00347d84ab10d820e0c136f |
|
BLAKE2b-256 | 5177d7006bba51c3911bcb6aaaf75e576effc0b5f95dc901a2235757bff3ba22 |
Close
Hashes for streaminghub_pydfds-0.1.36-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87e4b261baf9a87d9a3c17a9f3b6ab03b37fda531fd0b0a822274ec88a6d24f4 |
|
MD5 | 652f05c925c4daa1ab7d29e3f7d55fe4 |
|
BLAKE2b-256 | 4cc1752f384ee24e120dda4ac7ebb2c3316f8665f8b6239cd49a06a3a1776792 |