Skip to main content

sp



Sinapsis Data Readers

Package to read data in different formats and assign them to a specific type of Packet

🐍 Installation • 🚀 Features • 📚 Usage example • 📙 Documentation • 🔍 License

🐍 Installation

Install using your package manager of choice. We encourage the use of uv

Example with uv:

  uv pip install sinapsis-data-readers --extra-index-url https://pypi.sinapsis.tech

or with raw pip:

  pip install sinapsis-data-readers --extra-index-url https://pypi.sinapsis.tech

[!IMPORTANT] Templates in each package may require extra dependencies. For development, we recommend installing the package with all the optional dependencies:

with uv:

  uv pip install sinapsis-data-readers[all] --extra-index-url https://pypi.sinapsis.tech

or with raw pip:

  pip install sinapsis-data-readers[all] --extra-index-url https://pypi.sinapsis.tech

[!NOTE] Some templates also need system dependencies (e.g., ffmpeg). The installation depends on your OS. For Linux:

apt-get install -y ffmpeg

🚀 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.

[!TIP] Use CLI command sinapsis info --all-template-names to show a list with all the available Template names installed with Sinapsis Data Tools.

[!TIP] Use CLI command sinapsis info --example-template-config TEMPLATE_NAME to produce an example Agent config for the Template specified in TEMPLATE_NAME.

For example, for FolderImageDatasetCV2 use sinapsis info --example-template-config ImageSaver to produce the following example config:

agent:
  name: my_test_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

📚 Usage example

Example agent config You can copy and paste the following config and run it using the sinapsis cli, changing the data_dir attribute in the FolderImageDatasetCV2 and the root_dir attribute in the ImageSaver template
agent:
  name: my_test_agent
  description: agent to save image locally
templates:
- template_name: InputTemplate
  class_name: InputTemplate
  attributes: {}
- template_name: FolderImageDatasetCV2
  class_name: FolderImageDatasetCV2
  attributes:
    data_dir: /path/to/image
    pattern: '**/*'
    batch_size: 1
    load_on_init: true
    label_path_index: 0
    is_ground_truth: false

To run, simply use:

sinapsis run name_of_the_config.yml

📙 Documentation

Documentation for this and other sinapsis packages is available on the sinapsis website

Tutorials for different projects within sinapsis are available at sinapsis tutorials page

🔍 License

This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.

For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.

Metadata

Release files for sinapsis-data-readers 0.1.29

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 0.1.29
File Size Uploaded
sinapsis_data_readers-0.1.29.tar.gz 45.2 kB Details

Built distribution (wheel)

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

Total release size: 106.9 kB

Release files / sinapsis_data_readers-0.1.29.tar.gz

Download URL sinapsis_data_readers-0.1.29.tar.gz
Size 45.2 kB
Tags Source
SHA-256 checksum
How to use checksums
041b557ae54303607f44343c729740aae3cd891eaa0b4887aca2ae48419389e6
BLAKE2b-256 checksum
How to use checksums
0ecd8cdd69e962a9d0294174e1638cf8450caf0c81203e509358b99daf8fa571
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

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

Download URL sinapsis_data_readers-0.1.29-py3-none-any.whl
Size 61.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25306ca2eaf6a4c80e965cfe06751ea6c228d98f8306738205184ad7554b1d1a
BLAKE2b-256 checksum
How to use checksums
61881a57c4ca30a2c94ec447b5b5d510c9d76ae42117b0cc916d82c97542386b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

Release history Release notifications | RSS feed

This release

0.1.29 This release

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.13

2 release files

0.1.11

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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