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
extendssupport 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:
- Running WASM checks in a single worker container
- Spawning container checks as native K8s pods
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcb96618e00494d044f93c3adc4b2f024352004c9b397e0e93a5b48c7c604134
|
|
| MD5 |
ff41e321b0cc0ffb268e60e0988a82d0
|
|
| BLAKE2b-256 |
2caeefacdb11175754792b7530013e365087db93aea9e4cf342a83c19ee517a6
|
Provenance
The following attestation bundles were made for griot_core-0.9.1.tar.gz:
Publisher:
release.yml on griot-data/griot-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
griot_core-0.9.1.tar.gz -
Subject digest:
bcb96618e00494d044f93c3adc4b2f024352004c9b397e0e93a5b48c7c604134 - Sigstore transparency entry: 1059754300
- Sigstore integration time:
-
Permalink:
griot-data/griot-core@678e1eef3504dc9b7b3198fc03150aac6309c449 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/griot-data
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@678e1eef3504dc9b7b3198fc03150aac6309c449 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d31089574154609f48aca9156b3e6932c2df6b5fddd77d86eacfb4e5057846b
|
|
| MD5 |
3b81d093e6b96ac44012ac255b2253f1
|
|
| BLAKE2b-256 |
1eaaa61a9a92666c9fdcf870d085aa44cd0d2c623ef380e135d40a6347b56cbb
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
griot_core-0.9.1-py3-none-any.whl -
Subject digest:
5d31089574154609f48aca9156b3e6932c2df6b5fddd77d86eacfb4e5057846b - Sigstore transparency entry: 1059754301
- Sigstore integration time:
-
Permalink:
griot-data/griot-core@678e1eef3504dc9b7b3198fc03150aac6309c449 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/griot-data
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@678e1eef3504dc9b7b3198fc03150aac6309c449 -
Trigger Event:
push
-
Statement type: