Skip to main content

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.

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.6.0.tar.gz (291.4 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.6.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file cineon_format-3.6.0.tar.gz.

File metadata

  • Download URL: cineon_format-3.6.0.tar.gz
  • Upload date:
  • Size: 291.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.6.0.tar.gz
Algorithm Hash digest
SHA256 42ceb0b5cd4d14855e5c5afbe277d1837a35a6b4c54fa80559f3a97d56a3d2e6
MD5 f90e3b1c582ad0f8c388b2c2e404922d
BLAKE2b-256 976b6a21ba24033d6f6985e5b746e290077f55a1110613a9b1f53de5dbe85dc0

See more details on using hashes here.

File details

Details for the file cineon_format-3.6.0-py3-none-any.whl.

File metadata

  • Download URL: cineon_format-3.6.0-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 504f380fccca7829efbb5065c0692ec8524d88e79b55d07a6f8e74e66146bfb0
MD5 f6cb473eb2837a60384ee8b03aa48e57
BLAKE2b-256 6d90144f65992f2005f7995e2e2e86b13da58ddb6813c4a2cd48f1bb0357f007

See more details on using hashes here.

Release history Release notifications | RSS feed

3.7.0

2 files

This release

3.6.0 This release

2 files

3.5.2

2 files

3.5.0

2 files

3.4.2

2 files

3.4.1

2 files

3.2.0

2 files

3.1.0

2 files

3.0.7

2 files

3.0.1

2 files

3.0.0

2 files

Supported by

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