Python bindings for ICL (Intent Contract Language) — deterministic intent contracts
Project description
ICL Python Bindings
Python bindings for the ICL (Intent Contract Language) runtime.
Built with PyO3 + maturin — thin wrapper around the canonical Rust implementation.
Status: Alpha
This package is in early development. The API may change.
Install
pip install icl-runtime
Published on PyPI.
Or build from source (requires Rust toolchain):
pip install maturin
cd bindings/python
maturin develop
Usage
import icl
import json
contract_text = open("my-contract.icl").read()
# Parse
parsed = json.loads(icl.parse_contract(contract_text))
# Normalize (deterministic canonical form)
normalized = icl.normalize(contract_text)
# Verify (type checking, invariants, determinism)
result = json.loads(icl.verify(contract_text))
if result["valid"]:
print("Contract is valid!")
# Execute
output = json.loads(icl.execute(contract_text, '{"operation": "greet", "inputs": {"name": "World"}}'))
# Semantic hash (SHA-256)
hash_hex = icl.semantic_hash(contract_text)
Guarantees
- Deterministic: Same input always produces identical output
- Identical to Rust: All results match the canonical Rust implementation exactly
- Zero logic in bindings: All behavior comes from
icl-core
Development
# Build and install in development mode
maturin develop
# Run tests
pytest tests/
# Build wheel
maturin build --release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 icl_runtime-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: icl_runtime-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 509.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed8a7f67644bff269b9861852c9ebff72a423f96e09c960bda83869b80d0a590
|
|
| MD5 |
1e49cfd72907f6a77d0d2ce4e95aa443
|
|
| BLAKE2b-256 |
021f1ccab9abd2554264d8b4e1188902e7716d0f2695407a83f37bef0ea33118
|