Skip to main content

Example integrations and enforcement-point demonstrations for Context Compiler.

Project description

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

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 confirmation and resume flows change 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

context_compiler_example_integrations-0.1.0.tar.gz (66.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file context_compiler_example_integrations-0.1.0.tar.gz.

File metadata

  • Download URL: context_compiler_example_integrations-0.1.0.tar.gz
  • Upload date:
  • Size: 66.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for context_compiler_example_integrations-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b1cbdbb8f3b66885621a272ccad17fcbc19957fed0f18c7ecd75ff8fdecb5124
MD5 e64328e0eeff5ed5e718f028a4521158
BLAKE2b-256 2857c69938d8d6b0f142d2debefbd3a4874732237d17e2fdfee58a59787de16c

See more details on using hashes here.

File details

Details for the file context_compiler_example_integrations-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: context_compiler_example_integrations-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 114.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for context_compiler_example_integrations-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64ba031c4429c686e49b1f5827e1cc1bba1707b8d7dd1472c9b7c5e66fdeea35
MD5 1476e2780cb965ee45e93d97d3b250dd
BLAKE2b-256 c280f3217e4cf450238025961777f7e7d34b4f8a9ed586cc27f4f5b61d56f1e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page