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.1.tar.gz (148.3 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.1-py3-none-any.whl (201.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: griot_core-0.9.1.tar.gz
  • Upload date:
  • Size: 148.3 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.1.tar.gz
Algorithm Hash digest
SHA256 bcb96618e00494d044f93c3adc4b2f024352004c9b397e0e93a5b48c7c604134
MD5 ff41e321b0cc0ffb268e60e0988a82d0
BLAKE2b-256 2caeefacdb11175754792b7530013e365087db93aea9e4cf342a83c19ee517a6

See more details on using hashes here.

Provenance

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

Publisher: release.yml on griot-data/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.1-py3-none-any.whl.

File metadata

  • Download URL: griot_core-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 201.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d31089574154609f48aca9156b3e6932c2df6b5fddd77d86eacfb4e5057846b
MD5 3b81d093e6b96ac44012ac255b2253f1
BLAKE2b-256 1eaaa61a9a92666c9fdcf870d085aa44cd0d2c623ef380e135d40a6347b56cbb

See more details on using hashes here.

Provenance

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

Publisher: release.yml on griot-data/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