Skip to main content

aischemagate

AISchemaGate — thin alias package over contractgate for LLM structured-output validation. Same Rust engine, same cg_live_... API keys, same tenant service, same backend as DataContractGate.

pip install aischemagate

Why this package exists

The underlying engine, SDK, and API are DataContractGate — one validator, one gateway. aischemagate is the LLM / AI-agent-shaped front door: it re-exports contractgate under a name that reads correctly from the LLM-output-validation angle. Use whichever import name matches your mental model; the behavior is identical.

See:

  • aischemagate.com — product site
  • aischemagate.dev — developer documentation
  • RFC-094 (docs/rfcs/094-sdk-llm-output-guard.md) — SDK design

10-line quickstart

import os
from aischemagate import LLMGate
from openai import OpenAI

gate = LLMGate(
    api_key=os.environ["CONTRACTGATE_API_KEY"],
    contract_id="extract_invoice_v1",
    llm=OpenAI(),
)
result = gate.completion(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Extract invoice JSON from: ..."}],
    response_format={"type": "json_object"},
    auto_repair=True,
)
if result.ok:
    forward_downstream(result.payload)   # egress-sanitized; safe to forward

For Anthropic, call gate.message(model="claude-sonnet-4-5", messages=[...]). For vLLM / Ollama OpenAI-compat, call gate.completion(...) unchanged.

What's new

See CHANGELOG.md and the parent contractgate CHANGELOG — the alias version tracks initial release only; feature work is versioned on contractgate.

Metadata

Release files for aischemagate 0.1.0

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

Source distribution (sdist)

Source distribution for aischemagate 0.1.0
File Size Uploaded
aischemagate-0.1.0.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aischemagate 0.1.0
File Interpreter ABI Platform
aischemagate-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / aischemagate-0.1.0.tar.gz

Download URL aischemagate-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
21dab2d7234a60f9a5a69c62c5e66fb1af3141529f5c1450fe0413ee4fa4b5a8
BLAKE2b-256 checksum
How to use checksums
7e07fc35bc355741fa62cb20e1286770419b76de44614b80220be97b0f812e58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / aischemagate-0.1.0-py3-none-any.whl

Download URL aischemagate-0.1.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8568b4d09bd7e251925da895eb162fe274a0ca9ec7b45afb16d0b4e85ad06a7f
BLAKE2b-256 checksum
How to use checksums
65dbcd9d2e0ce4dd218833fa497432903c572ab5e6ce829adddc5435e8790294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

This release

0.1.0 This release

2 release files

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