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.
- The core authority contract is provided by
context-compiler. - Directive recognition can optionally be added with
context-compiler-directive-drafter. - These examples focus on where authoritative state changes application behavior.
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.3
Add extras only for the examples you want to inspect locally:
pip install "context-compiler-example-integrations[drafter]"for examples that usecontext-compiler-directive-drafterpip install "context-compiler-example-integrations[retrieval]"for ChromaDB retrieval filtering examplespip install "context-compiler-example-integrations[fastapi]"for FastAPI variantspip install "context-compiler-example-integrations[litellm]"for LiteLLM-oriented examples and reference integrationspip 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:
- Clone
context-compiler-example-integrations. - Choose a generic example or a reference integration.
- Open that example's README.
- Follow the example-specific setup, runtime, and validation instructions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file context_compiler_example_integrations-0.1.2.tar.gz.
File metadata
- Download URL: context_compiler_example_integrations-0.1.2.tar.gz
- Upload date:
- Size: 66.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7e909dfb31d0c95d35c4672b3a9335b4fe7c758044e3de5d93572f1c09806cd
|
|
| MD5 |
290f2f2bfaf8aa873fd90112220d6469
|
|
| BLAKE2b-256 |
7fdb7f3c8ac89f88828badea304abdbc354b04b25aef807b1a715db5d5ab83fc
|
Provenance
The following attestation bundles were made for context_compiler_example_integrations-0.1.2.tar.gz:
Publisher:
publish-python.yml on rlippmann/context-compiler-example-integrations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
context_compiler_example_integrations-0.1.2.tar.gz -
Subject digest:
e7e909dfb31d0c95d35c4672b3a9335b4fe7c758044e3de5d93572f1c09806cd - Sigstore transparency entry: 2181241810
- Sigstore integration time:
-
Permalink:
rlippmann/context-compiler-example-integrations@e5c20f33b9865c5b5a8c75e5c30bb0fcd2d31347 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/rlippmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@e5c20f33b9865c5b5a8c75e5c30bb0fcd2d31347 -
Trigger Event:
release
-
Statement type:
File details
Details for the file context_compiler_example_integrations-0.1.2-py3-none-any.whl.
File metadata
- Download URL: context_compiler_example_integrations-0.1.2-py3-none-any.whl
- Upload date:
- Size: 114.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7cb438883e4901393cb4bc32ecc7d70d2a3a62f9d2f4cfc542d782ad576b107
|
|
| MD5 |
929b0cacaad68e437e97c5d238bc3b52
|
|
| BLAKE2b-256 |
696ff64d7e893635a861cd70e4d1cce3a5ddbe3093116bd00df4b313f90701dd
|
Provenance
The following attestation bundles were made for context_compiler_example_integrations-0.1.2-py3-none-any.whl:
Publisher:
publish-python.yml on rlippmann/context-compiler-example-integrations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
context_compiler_example_integrations-0.1.2-py3-none-any.whl -
Subject digest:
f7cb438883e4901393cb4bc32ecc7d70d2a3a62f9d2f4cfc542d782ad576b107 - Sigstore transparency entry: 2181241994
- Sigstore integration time:
-
Permalink:
rlippmann/context-compiler-example-integrations@e5c20f33b9865c5b5a8c75e5c30bb0fcd2d31347 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/rlippmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@e5c20f33b9865c5b5a8c75e5c30bb0fcd2d31347 -
Trigger Event:
release
-
Statement type: