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.3.2

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

Built distribution (wheel)

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

Total release size: 7.1 kB

Release files / aischemagate-0.3.2.tar.gz

Download URL aischemagate-0.3.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d182e40594d7886dc8546737ad55e1ae52f680b057cb5d5d507fcfc7e02cdbff
BLAKE2b-256 checksum
How to use checksums
b76fe67000599f9321a2c58a4e290eb71ca987f707815988bf2ce1c5fcfa4330
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.3.2-py3-none-any.whl

Download URL aischemagate-0.3.2-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bbae4c774a21d72ae058902bc9521a7a990b7f96ca9a5b3a2c8fd86fed7dc55
BLAKE2b-256 checksum
How to use checksums
1729ca0071689428226ce94e79ecf20709e1da43455ee982c9c313cc28b7c889
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

0.4.0

2 release files

This release

0.3.2 This release

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