Skip to main content


Sinapsis
Sinapsis Data-Readers

Bring files, datasets, video and streaming data into typed Sinapsis packets.

Overview

sinapsis-data-readers — Templates to read data in different formats.

Input adapters are often repeated across projects. These Templates turn source-specific data into a DataContainer, letting downstream models operate on a consistent shape and metadata contract.

Where it fits

Choose the reader and extra for the underlying format—OpenCV, FFmpeg, soundfile, DALI, tabular datasets, and others. Video streaming and offline dataset loading have different buffering and performance needs.

Installation

Requires Python 3.13 or later, as declared in this package’s manifest. Install the base distribution using your preferred package manager:

uv pip install sinapsis-data-readers
# or
pip install sinapsis-data-readers

Optional features and dependencies

The base installation includes the dependencies required by the package. The following extras are declared in this package’s pyproject.toml; install only those needed by your workflow. They are standard Python optional dependencies, not separate execution profiles.

Extra Adds / when to select it
nvidia-dali NVIDIA DALI data pipelines. Dependencies: nvidia-dali-cuda120
torch-codec Torch codec support. Dependencies: torch, torchcodec
sklearn-datasets Sklearn datasets support. Dependencies: pandas, scikit-learn
sktime-datareaders Sktime datareaders support. Dependencies: sktime
coco-dataset Coco dataset support. Dependencies: pycocotools
soundfile Soundfile support. Dependencies: soundfile
pydub Pydub support. Dependencies: pydub, soundfile
all Bundle declared by this package; its manifest includes coco-dataset, nvidia-dali, pydub, sklearn-datasets, sktime-datareaders, soundfile, torch-codec, opencv, ffmpeg, kornia.
opencv OpenCV image/video support. Dependencies: opencv-python-headless
ffmpeg FFmpeg media reading/writing support. Dependencies: ffmpeg-python
kornia Kornia support. Dependencies: kornia, kornia-rs, pillow

For folder-based image loading, install OpenCV support:

uv pip install "sinapsis-data-readers[opencv]"

The manifest also defines development-only dependency groups: dev (pre-commit, ruff, ty). These support source development and testing and are not runtime extras.

🚀 Features

  • Sinapsis Data Readers
    • Audio Readers
      Read audio files from several formats using Pydub, Soundfile, among others.
    • Dataset Readers
      Read and manipulate tabular datasets from the scikit libraries, among others.
    • Image Readers
      Read and manipulate images from COCO, paths in CSVs, whole folders, etc.
    • Text Readers
      Read text data from a simple string and other sources.
    • Video Readers
      Read videoframes using CV2, Dali, FFMPEG, Torch, among others.

For example, for FolderImageDatasetCV2 use sinx templates example-config FolderImageDatasetCV2 to produce the following example config:

agent:
  name: my_image_reader_agent
  description: Agent to read images from a folder using OpenCV
templates:
- template_name: InputTemplate
  class_name: InputTemplate
  attributes: {}
- template_name: FolderImageDatasetCV2
  class_name: FolderImageDatasetCV2
  template_input: InputTemplate
  attributes:
    data_dir: '/path/to/sinapsis/cache/dir'
    pattern: '**/*'
    batch_size: 1
    shuffle_data: false
    samples_to_load: -1
    load_on_init: false
    label_path_index: -2
    is_ground_truth: false

Template discovery and examples

The package exposes Template implementations including FolderImageDatasetCV2, CSVDatasetReader, TextInput, SKTimeDatasets, SKLearnDatasets.

Inspect the installed environment for the exact classes and validated attributes, then generate a starter configuration:

sinx templates show-all
sinx templates example-config FolderImageDatasetCV2

FolderImageDatasetCV2 is provided by the opencv extra. Use it for folder-based images, or select the reader matching your data source and install its corresponding extra.

Documentation

License

Sinapsis open-source components are available under your choice of the MIT License or the Apache License 2.0, unless otherwise noted.

Metadata

Release files for sinapsis-data-readers 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinapsis-data-readers 1.0.1
File Size Uploaded Provenance Actions
sinapsis_data_readers-1.0.1.tar.gz 130.7 kB Without provenance Details for sinapsis_data_readers-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sinapsis-data-readers 1.0.1
File Interpreter ABI Platform Actions
sinapsis_data_readers-1.0.1-py3-none-any.whl Python 3 none any Details for sinapsis_data_readers-1.0.1-py3-none-any.whl

Total release size: 184.8 kB

Release files / sinapsis_data_readers-1.0.1.tar.gz

Download URL sinapsis_data_readers-1.0.1.tar.gz
Size 130.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d645ca4e776348eaeff180930b5b3ae27efb2cc2677854a1f30dfc3c44e9ee30
BLAKE2b-256 checksum
How to use checksums
37bd9b74569c471d029607fb573f7adf2ab2825d7be1646c5e16e21d4fb7f996
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release files / sinapsis_data_readers-1.0.1-py3-none-any.whl

Download URL sinapsis_data_readers-1.0.1-py3-none-any.whl
Size 54.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a1b7b5bd50ab3238f284db59e8cab51ad3049f059356ac72218ae2db5ffc922
BLAKE2b-256 checksum
How to use checksums
3e6a0b93cd2d4237fc5ed326c74b24dd4c9f4bd52a1012bf6480323bfc52c49b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Security for sinapsis-data-readers 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page