Skip to main content

Add your description here

Project description

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')

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):
    ...

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

jabs_io-0.2.1a0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jabs_io-0.2.1a0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file jabs_io-0.2.1a0.tar.gz.

File metadata

  • Download URL: jabs_io-0.2.1a0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for jabs_io-0.2.1a0.tar.gz
Algorithm Hash digest
SHA256 d9f78b32b23fb1c236681d4f1857000bcf76b371e04ded42f6c61a189703f6a9
MD5 3ee7f3127c6641f8a715e82b76e78e5f
BLAKE2b-256 d9641ec3c6e83cb415fc185aa5769ac827a9953715a62c733adec25af0ff2257

See more details on using hashes here.

File details

Details for the file jabs_io-0.2.1a0-py3-none-any.whl.

File metadata

  • Download URL: jabs_io-0.2.1a0-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for jabs_io-0.2.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 be54ca2e2f4d6614c809e02a475d28ece531950031a7b98c76e3f35ccca107cb
MD5 844c6c09942da7bfcc6b8ba75683b87a
BLAKE2b-256 a3109b42c6e1d3b3904d31ecd7da4959bad690d2a59cc6b546a7d5419f3d4de2

See more details on using hashes here.

Supported by

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