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.4.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.4.0
File Size Uploaded
aischemagate-0.4.0.tar.gz 4.0 kB Details

Built distribution (wheel)

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

Total release size: 7.2 kB

Release files / aischemagate-0.4.0.tar.gz

Download URL aischemagate-0.4.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cccd5f1176cf4d3423ddf515f2aa62e15388c6f6b9b36496f5f3f1fe1a5a4c78
BLAKE2b-256 checksum
How to use checksums
183bdb2e841b270804be5b774c10950161bfc09a29e93f84b025674379fa3951
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 13, 2026.

Transparency log

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

Download URL aischemagate-0.4.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7feede7f922328e9c82e575b82f74d479c8e0100665df4e723548e95cbd4800e
BLAKE2b-256 checksum
How to use checksums
9ec09567c7ed8b0fe340d7ae158d55c9943ec98e8d49c9358f1310d3fcdea31e
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 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.1.0

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