Skip to main content

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

Metadata

Release files for icl-runtime 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for icl-runtime 0.1.4
File Interpreter ABI Platform
icl_runtime-0.1.4-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details

Release files / icl_runtime-0.1.4-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL icl_runtime-0.1.4-cp313-cp313-manylinux_2_34_x86_64.whl
Size 509.3 kB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
2322bd1adc1311b4efdefae638e95ace95d805a5ae86e39712585d9799340cdf
BLAKE2b-256 checksum
How to use checksums
8a1902f759000092b4bc3ee41e0add073c91e84d6d215bc007736b0e507cb6b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for icl-runtime 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page