Skip to main content

Core library for Griot data contracts - schema validation, mock generation, and AI manifests

Project description

griot-core

Core library for the Griot data contract system. Provides contract models, validation, parsing, orchestration, and executor runtime.

Features

  • Schema-First Models: First-class schema entities with property definitions
  • Contract Inheritance: Templates and extends support with deep merge
  • Validation Engine: Profile-based check execution
  • Orchestration: Smart job splitting to avoid Docker-in-Docker
  • Executor Runtime: WASM and container execution
  • Workers: Lambda, K8s, Cloud Run, and local workers

Installation

pip install griot-core

# With compute backends
pip install griot-core[kubernetes]
pip install griot-core[aws]
pip install griot-core[gcp]

Quick Start

Loading Contracts

from griot_core import load_contract

contract = load_contract("path/to/contract.yaml")

Validation with Orchestration

from griot_core.orchestration import (
    ValidationOrchestrator,
    DispatcherConfig,
    ComputeBackend,
)

# Configure for Kubernetes
config = DispatcherConfig(
    backend=ComputeBackend.KUBERNETES,
    wasm_worker_image="griot/wasm-worker:v1.0",
)

orchestrator = ValidationOrchestrator(
    dispatcher_config=config,
    namespace="griot",
)

# Execute validation
result = await orchestrator.validate(
    contract=contract,
    profile="data_engineering",
    data_reference={"s3": "s3://bucket/data.parquet"},
)

print(f"Valid: {result.is_valid}")
print(f"Passed: {result.passed_checks}/{result.total_checks}")

Local Development

config = DispatcherConfig(backend=ComputeBackend.LOCAL)
orchestrator = ValidationOrchestrator(dispatcher_config=config)

result = await orchestrator.validate(
    contract=contract,
    profile="data_engineering",
    data_reference={"file": "/path/to/data.parquet"},
)

Architecture

griot-core/
├── models/        # Schema, Contract, Property, Check, Enums
├── parsing/       # YAML/JSON parsing and validation
├── resolution/    # Contract inheritance resolution
├── export/        # JSON Schema export
├── validation/    # ValidationEngine, ProfileResolver
├── executors/     # WASM/Container runtime
├── orchestration/ # Compute orchestration, job splitting, dispatchers
├── connectors/    # Data source connectors
├── workers/       # Lambda, K8s, Cloud Run, WASM workers
├── integrations/  # Airflow, Prefect, Dagster
└── privacy/       # PII patterns and validators

Orchestration Module

The orchestration module handles compute orchestration for validation jobs:

  • JobSplitter: Separates WASM and container checks
  • ValidationOrchestrator: Main entry point
  • ResultAggregator: Combines parallel execution results
  • Dispatchers: K8s, Lambda, Cloud Run, Local

This avoids Docker-in-Docker by:

  1. Running WASM checks in a single worker container
  2. Spawning container checks as native K8s pods
  3. Executing all jobs in parallel

Important

griot-core is framework-agnostic. It does NOT import pandas, polars, pyspark, or dask. All DataFrame processing happens inside WASM/Container executors. Data is exchanged using Arrow IPC format.

Documentation

cd docs
pip install -r requirements.txt
sphinx-build -b html . _build/html

License

Apache-2.0

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

griot_core-0.9.3.tar.gz (149.0 kB view details)

Uploaded Source

Built Distribution

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

griot_core-0.9.3-py3-none-any.whl (202.0 kB view details)

Uploaded Python 3

File details

Details for the file griot_core-0.9.3.tar.gz.

File metadata

  • Download URL: griot_core-0.9.3.tar.gz
  • Upload date:
  • Size: 149.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for griot_core-0.9.3.tar.gz
Algorithm Hash digest
SHA256 9af841f2376208d1a48f61eac654bf169f5b7a9aea97cc26d4f86d2d168bebf8
MD5 56c578584f655775d860c7a55348c61b
BLAKE2b-256 17ada3137bddda8ae88f7650b3e10ed82a31fdca7f421d65ff611948947d5bc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for griot_core-0.9.3.tar.gz:

Publisher: release.yml on Griot-Data-Technologies/griot-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file griot_core-0.9.3-py3-none-any.whl.

File metadata

  • Download URL: griot_core-0.9.3-py3-none-any.whl
  • Upload date:
  • Size: 202.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for griot_core-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 23c8d6f4e8892a84dce14f73989c2fc9df0814005d7f546dc4d7ba7c030f64cb
MD5 a6b7bd26c228058d6f690c5de9275a11
BLAKE2b-256 f3a864d48af52894606c28e9d23ce7aca288cb1abb1c1b1d6547615f47f32d98

See more details on using hashes here.

Provenance

The following attestation bundles were made for griot_core-0.9.3-py3-none-any.whl:

Publisher: release.yml on Griot-Data-Technologies/griot-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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