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.40
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
Built Distribution
File details
Details for the file streaminghub_pydfds-0.1.40.tar.gz
.
File metadata
- Download URL: streaminghub_pydfds-0.1.40.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bae3b8cbf689df017e8197ba927044d2aa7ee4ed0e1d41be2458675f2b337e0 |
|
MD5 | 40550d70e00183ccd9f1abbfae028ca8 |
|
BLAKE2b-256 | 902106117f81bbce5df01af571ca084d06c6ec1adcc7afee5fd46aff2fdd475a |
File details
Details for the file streaminghub_pydfds-0.1.40-py3-none-any.whl
.
File metadata
- Download URL: streaminghub_pydfds-0.1.40-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e0042bf143b84301403871361f0dbca01f4b6150543b771424c0adcb2561b95 |
|
MD5 | cf1755294a29698f6d73a6702f046df3 |
|
BLAKE2b-256 | 0fa1f4f4756aa58a874c459c42de5133319340fc1e045e621108dda6812a0c79 |