Skip to main content

Context Compiler Example Integrations for Python

These examples show how authoritative state changes application behavior at runtime.

Each example demonstrates a single enforcement point where premise and policy influence what a host allows, routes, retrieves, builds, or executes.

Prompt reinjection influences model behavior.

Context Compiler influences runtime behavior.

Install options

Base installation keeps this package discovery-first:

pip install "context-compiler-example-integrations"

That installs the shared core dependency only:

  • context-compiler>=0.9.1,<0.10

Add extras only for the examples you want to inspect locally:

  • pip install "context-compiler-example-integrations[drafter]" for examples that use context-compiler-directive-drafter
  • pip install "context-compiler-example-integrations[retrieval]" for ChromaDB retrieval filtering examples
  • pip install "context-compiler-example-integrations[fastapi]" for FastAPI variants
  • pip install "context-compiler-example-integrations[litellm]" for LiteLLM-oriented examples and reference integrations
  • pip install "context-compiler-example-integrations[all]" to install all package-managed optional dependencies

Open WebUI is not installed by this package. The Open WebUI reference integration assumes Open WebUI is already installed and configured as the host runtime.

Generic examples

  • Checkpoint continuation: persisted authoritative state changes host behavior across turns or requests
  • Execution authorization: protected host actions execute only when authoritative state allows them
  • Gateway middleware: the host allows, blocks, or routes requests before downstream work runs
  • Prompt construction: the host builds different request or prompt payloads from authoritative state
  • Retrieval filtering: the host changes which documents are eligible or relevant before returning results
  • Schema selection: the host picks different workflow or response schemas from authoritative state
  • Tool gating: the host changes which tools are visible or executable at runtime

Reference integrations

Python also includes reference integrations for runtime-specific behavior after the generic examples.

Open a reference integration when you want to see the same kind of runtime behavior on a specific host or framework surface.

Start with the generic example first, then use the Python reference integrations to inspect a runtime-specific path:

Run an example

To explore or run an example, use a repository checkout:

  1. Clone context-compiler-example-integrations.
  2. Choose a generic example or a reference integration.
  3. Open that example's README.
  4. Follow the example-specific setup, runtime, and validation instructions.

Metadata

Release files for context-compiler-example-integrations 0.2.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 context-compiler-example-integrations 0.2.0
File Size Uploaded
context_compiler_example_integrations-0.2.0.tar.gz 64.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for context-compiler-example-integrations 0.2.0
File Interpreter ABI Platform
context_compiler_example_integrations-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 174.1 kB

Release files / context_compiler_example_integrations-0.2.0.tar.gz

Download URL context_compiler_example_integrations-0.2.0.tar.gz
Size 64.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d6a59064d6c149fdc18509566a8bb564892823efccb394d991f8160eef2f844f
BLAKE2b-256 checksum
How to use checksums
7718dde8ec8fbbc4b152c15586a87b60c2827eefa2b3fec22acb942831dc52e2
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 Sep 21, 2026.

Transparency log

Release files / context_compiler_example_integrations-0.2.0-py3-none-any.whl

Download URL context_compiler_example_integrations-0.2.0-py3-none-any.whl
Size 109.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9dbff84d4e4a52698a9bfce80f3bf6053d57b0796e0d5ecd8371eddfdd1df3c
BLAKE2b-256 checksum
How to use checksums
78217cfa3d4d54fa505e5f6bb943f51bb7f293e69a13b00c332a27841196bb0c
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 Sep 21, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.2

2 release files

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