Skip to main content

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


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.21.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

streaminghub_pydfds-0.1.21-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page