Metadata-Version: 2.4
Name: icl-runtime
Version: 0.1.4
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Libraries
Summary: Python bindings for ICL (Intent Contract Language) — deterministic intent contracts
Keywords: icl,intent,contract,deterministic,ai
Author: ICL Team
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/ICL-System/ICL-Docs
Project-URL: Homepage, https://github.com/ICL-System/ICL-Runtime
Project-URL: Repository, https://github.com/ICL-System/ICL-Runtime

# ICL Python Bindings

Python bindings for the [ICL (Intent Contract Language)](https://github.com/ICL-System/ICL-Runtime) runtime.

Built with [PyO3](https://pyo3.rs) + [maturin](https://www.maturin.rs) — thin wrapper around the canonical Rust implementation.

## Status: Alpha

This package is in early development. The API may change.

## Install

```bash
pip install icl-runtime
```

Published on [PyPI](https://pypi.org/project/icl-runtime/).

Or build from source (requires Rust toolchain):

```bash
pip install maturin
cd bindings/python
maturin develop
```

## Usage

```python
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

```bash
# Build and install in development mode
maturin develop

# Run tests
pytest tests/

# Build wheel
maturin build --release
```

