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.21
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.21.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07b351727c13b8f1079e2b96a833b826ed8d56769041d45742a86c56c525b27c |
|
MD5 | 6ce0b0c478bc690fc542cad80bd096b9 |
|
BLAKE2b-256 | 65febcc0651c33a2079fc02428f24383e128b8fe0f35fff3178dda2f8f324db5 |
Close
Hashes for streaminghub_pydfds-0.1.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b53baa2c8aee8a4f76f90e5dbb6e9c57b426d2251d37741e33192af9cedbd222 |
|
MD5 | 8d5705ab7cd80c4fe7ddb425bee2f832 |
|
BLAKE2b-256 | d23941b820fae326d093d615cca535add4bdbfefcb9d00567a2197feaa732b7b |