JABS IO (jabs-io)
This package handles all serialization/deserialization logic.
Overview
jabs-io decouples the JABS data representation from specific file formats or legacy
versions. It provides a unified way to interact with pose estimation data, behavioral
features, and annotations.
API
The package provides a high level API that's intended to cover most use-cases.
from jabs.io import save, load
from jabs.core.types.keypoints import FrameKeypoints
data_instance = load('frames.json', FrameKeypoints)
save(data_instance, 'frames.parquet')
Installation extras
jabs-io ships optional extras for format-specific backends:
| Extra | Installs | Enables |
|---|---|---|
nwb |
pynwb, ndx-pose, ndx-multisubjects, ndx-jabs |
NWB pose file read/write |
parquet |
pyarrow |
Parquet feature cache I/O |
HDF5 is not an extra: h5py is a required dependency, since pose files, prediction
files and the default feature cache are all HDF5. pyarrow is a direct dependency of
jabs-behavior-classifier, so the parquet backend is available automatically when
jabs-io is installed as part of the full JABS application. The nwb extra must
always be installed explicitly:
pip install "jabs-behavior-classifier[nwb]"
When using jabs-io as a standalone library:
pip install "jabs-io[nwb,parquet]"
Development
Data models are defined as dataclasses in jabs-core: jabs.core.types. Some backends
will be able to implicitly handle most dataclasses, but if the dataclass is
complicated, or if there is special handling required of the type for a backend, then a
type specific adapter should be defined.
All adapters must inherit from jabs.io.base.Adapter.
For convenience, backend specific subclasses are provided that handle shared functionality for specific file backends.
from jabs.io.base import (
JSONAdapter,
ParquetAdapter,
# TODO: HDF5Adapter,
)
To register your adapter for use, use the register adapter decorator.
from jabs.core.enums import StorageFormat
from jabs.io.base import JSONAdapter
from jabs.io.registry import register_adapter
@register_adapter(StorageFormat.JSON)
class DataclassJSONAdapter(JSONAdapter):
...
Metadata
Release files for jabs-io 0.50.1
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 |
|---|---|---|---|---|
| jabs_io-0.50.1.tar.gz | 55.4 kB | Without provenance | Details for jabs_io-0.50.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jabs_io-0.50.1-py3-none-any.whl | Python 3 | none | any | Details for jabs_io-0.50.1-py3-none-any.whl |
Total release size: 124.3 kB
Release files / jabs_io-0.50.1.tar.gz
| Download URL | jabs_io-0.50.1.tar.gz |
|---|---|
| Size | 55.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b90385276d609eca20084419212859cc7c2cb0d2316a8da41265322c3f13a57
|
|
BLAKE2b-256 checksum How to use checksums |
787cb4f6ce21a3fd041045cefe6c00c738a2d8fcf6cd1a52e10f9f2092c27d4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / jabs_io-0.50.1-py3-none-any.whl
| Download URL | jabs_io-0.50.1-py3-none-any.whl |
|---|---|
| Size | 68.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f8128101594805e01e2542c34b9a8745a689bbc384fd8067b8a62a6c96d2505
|
|
BLAKE2b-256 checksum How to use checksums |
09a86c8093f24d1f0da34246587734fc73bdaac7b580b87e516b6f0538d33be3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for jabs-io 0.50.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.