Sinapsis Data-Writers
Persist images, audio, video and other packet results.
Overview
sinapsis-data-writers — Templates to write DataContainer content to file.
A workflow often produces results in several modalities. Writers standardise saving these outputs so model Templates can remain independent of filesystem paths and export formats.
Where it fits
Select optional encoders for the output modality: opencv/ffmpeg for visual media, audio libraries for sound and PDF tools for document rendering. Output destination permissions are environment-specific.
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-writers
# or
pip install sinapsis-data-writers
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 |
|---|---|
pydub |
Pydub support. Dependencies: pydub |
soundfile |
Soundfile support. Dependencies: soundfile |
pdf-image-writer |
PDF/image export support. Dependencies: pdf2image |
all |
Bundle declared by this package; its manifest includes pdf-image-writer, pydub, soundfile, opencv, ffmpeg. |
opencv |
OpenCV image/video support. Dependencies: opencv-python-headless |
ffmpeg |
FFmpeg media reading/writing support. Dependencies: ffmpeg-python |
For example:
uv pip install "sinapsis-data-writers[pydub]"
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 Writers
Write data to many kinds of files.- Annotation Writers
Save text annotations to JSON, geometries to polygons, etc. - Audio Writers
Save to audio files using Soundfile, among others. - Image Writers Save to image files using CV2, among others.
- Video Writers
Save to video files using CV2 or FFMPEG, among others.
- Annotation Writers
- Sinapsis Generic Data Tools
Wide range of miscellaneous tools to manipulate your data.
For example, for ImageSaver use sinx templates example-config ImageSaver to produce the following example config:
agent:
name: my_image_writer_agent
description: Agent to save image packets locally
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: ImageSaver
class_name: ImageSaver
template_input: InputTemplate
attributes:
save_dir: /path/to/save/dir
extension: jpg
root_dir: '/path/to/sinapsis/cache'
save_full_image: true
save_bbox_crops: false
save_mask_crops: false
min_bbox_dim: 5
Template discovery and examples
The package exposes Template implementations including ImageSaver, GenericDataJSONWriter, AudioWriterSoundfile, PDFToImage.
Inspect the installed environment for the exact classes and validated attributes, then generate a starter configuration:
sinx templates show-all
sinx templates example-config ImageSaver
Choose the writer based on the packet type and desired output format. ImageSaver writes image packets, while the JSON and audio writers operate on different payloads and have different optional dependencies.
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-writers 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sinapsis_data_writers-1.0.0.tar.gz | 71.7 kB | Without provenance | Details for sinapsis_data_writers-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sinapsis_data_writers-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for sinapsis_data_writers-1.0.0-py3-none-any.whl |
Total release size: 79.9 kB
Release files / sinapsis_data_writers-1.0.0.tar.gz
| Download URL | sinapsis_data_writers-1.0.0.tar.gz |
|---|---|
| Size | 71.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6acfeabbdea67f2f0143fd49206a82c83385831ed97a3537848767661219791
|
|
BLAKE2b-256 checksum How to use checksums |
c8cec2fa2532e378500da6b2cb855555313310000af2c0ccd33b4a0db15542de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Release files / sinapsis_data_writers-1.0.0-py3-none-any.whl
| Download URL | sinapsis_data_writers-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df2e4e8b453e1dce79964c47ca48e69ae2aa13559703ab4d1313604a40436583
|
|
BLAKE2b-256 checksum How to use checksums |
245cee2566428b845b1138e97858ddef312109f22bcf4d8bafcfd725b57c9a3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Security for sinapsis-data-writers 1.0.0
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.