Skip to main content

Definitions for Cineon data formats.

Project description

Cineon Format

Latest Release Coverage Status Code complexity

This package contains a definition of a common data format to be used across Cineon repositories.

The CineonData format is a class that inherits from pydantic's BaseModel class, and as such the data validation is performed on class instantiation. If the data being ingested has a problem then class instantiation will fail. Simple. This is useful because downstream processing tasks can make valid assumptions about the data and therefore do not have to perform any explicit checks. This means that lots of downstream data-validation code can be deleted.

Prerequisites

To use the example script in the package you need to install uv, but you do not need uv in order to use the package in other Python code.

Usage

Add the cineon_format package into your project, with either:

poetry add git+https://github.com/cineon-ai/cineon_format.git
uv add git+https://github.com/cineon-ai/cineon_format.git

Then:

from cineon_format import CineonData

# Load from CSV
cineon_data = CineonData.from_csv("path/to/csv")

# Alternatively, load from JSON
cineon_data = CineonData.from_json("path/to/json")

Examples

Running the example script with either:

uv run scripts/example.py --csv=data/good.csv
uv run scripts/example.py --json=data/good.json

will load a file, convert that file into the CineonData format and then spit out a dictionary representation and a DataFrame representation to the terminal.

If you run the script with either:

uv run scripts/example.py --csv=data/bad.csv
uv run scripts/example.py --json=data/bad.json

you can see examples of data that does not conform to the format, and therefore errors out with helpful error messages printed to the terminal.

"Random" CineonData can be generated via the script:

uv run scripts/generate.py

This will print a summary of the CineonData to the terminal.

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

cineon_format-3.4.1b2.tar.gz (288.3 kB view details)

Uploaded Source

Built Distribution

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

cineon_format-3.4.1b2-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file cineon_format-3.4.1b2.tar.gz.

File metadata

  • Download URL: cineon_format-3.4.1b2.tar.gz
  • Upload date:
  • Size: 288.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","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}

File hashes

Hashes for cineon_format-3.4.1b2.tar.gz
Algorithm Hash digest
SHA256 bf1ad6be85ebdc169bd57c28aca6836648b8481ee356d7d2e2ef1d283ae11f06
MD5 4f3640a0c152b478c5b6abf049e2f970
BLAKE2b-256 d0ac81f46dfe635a583b2c6b46be765d38f683317beb7615b138bd276ee3cbae

See more details on using hashes here.

File details

Details for the file cineon_format-3.4.1b2-py3-none-any.whl.

File metadata

  • Download URL: cineon_format-3.4.1b2-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","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}

File hashes

Hashes for cineon_format-3.4.1b2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7f483cda82f7805a22b3e3c10c249cd76b2150b3e50454cf8e128b7f35fbb9b
MD5 338b9f7b07717e26a00e2f5a6868d12d
BLAKE2b-256 9a633d40364a6fe2fb01280d50dbdd878b4516e352341affa42b814172914b85

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