This release is a pre-release and may not be stable for production use.
Lintel
Lintel turns a UMF document plus an exposure file into a prepared GraphQL API and serves it with FastAPI.
Status: alpha. The standalone quickstart uses an in-memory data port.
Batten supplies PostgreSQL access for the qualified local task-board profile.
The PyPI project is lintel-api (the unrelated lintel project is a docstring checker).
Quickstart
Python 3.11 or newer. This block is executed by CI from a freshly built wheel.
pip install --pre "lintel-api[build,serve]"
lintel example task-board demo
lintel prepare demo/task-board.umf.json --exposure demo/exposure.json --host demo/host-profile.json -o demo/api.json
# The server prints its x-lintel-api digest; use it as $DIGEST in a second terminal.
lintel serve demo/api.json --records demo/records.json &
curl -s localhost:8000/graphql -H "x-lintel-api: $DIGEST" -H 'content-type: application/json' -d '{"query":"{ node(id: \"demo.task-board.identity-v1:board.Task:task-1\") { id ... on Task { title estimate } } }"}'
The answer is {"data":{"node":{"id":"demo.task-board.identity-v1:board.Task:task-1","title":"Write the quickstart","estimate":"3.50"}}}.
lintel example writes four files: the UMF model, an exposure file (which records and
fields the API shows), a host profile (limits) and records.json (the demo rows).
lintel prepare validates the UMF document and issues api.json, a pinned artifact.
lintel serve admits the artifact and serves POST /graphql on 127.0.0.1:8000.
Every request must send the artifact's digest in x-lintel-api. serve applies no
authentication; keep it on localhost.
What is tested
CI (Linux, Python 3.11) tests: preparing v1 prepared APIs from UMF (umf-core 0.10.x),
keyed node / nodes reads through the in-memory port, runtime admission and tamper
checks, Node IDs, and the commands above from a built wheel in a fresh virtualenv.
The standalone lintel serve command covers in-memory keyed reads. The local
Batten comparison separately exercises prepared API v5 routes against PostgreSQL
18.6 with generated TypeScript in Chromium. The v2 through v5 builders require
umf_access_generated_executor and refuse when it is unavailable.
Stack integration
Lintel imports only umf-core (the build extra; UMF validation and reading). It does not
import umf-weft, umf-codegen, umf-access, Truss or Ashlar. The runtime itself imports
no UMF package.
Embedding
Mount the router in your own FastAPI app with your own authenticated scope and port:
from lintel.graphql import create_router
from lintel.projection import load_prepared_api
router = create_router(prepared, my_execution_port, my_node_codec, resolve_scope)
my_execution_port implements lintel.ports.ExecutionPort; lintel.memory.MemoryPort is a
reference implementation. See architecture and the
contracts.
Prepared API v5 HTTP routes
lintel.build.http_projection.project_http(prepared) returns the OpenAPI 3.1
document and named operation definitions. Generate the browser client against
that document and configure its base URL to the deployed Lintel prefix. The
HTTP profile includes resource refetch, forward pages, one selected to-one
relationship per request, and separate command invocation and observation.
For Batten, mount both Lintel routers under the same HostScopeIngress and
pass its resolve_context to each. Give the HTTP router a dedicated prefix so
its operations do not collide with Batten's own /api/operations routes.
from lintel.graphql import create_router as graphql_router
from lintel.http import create_router as http_router
api.include_router(graphql_router(prepared, execution, codec, ingress.resolve_context))
api.include_router(
http_router(prepared, execution, codec, ingress.resolve_context), prefix="/lintel"
)
# Batten mounts ingress.wrap(api) at /api.
Requests send the admitted digest in x-lintel-api. This is the local Batten
task-board profile. The standalone quickstart continues to serve GraphQL.
Experimental
lintel.experimental (install lintel-api[experimental]) is a laboratory projection with
probe and echo roots. It is not a production API and may change or disappear.
Development
uv sync --locked
uv run ruff check . && uv run pyright && uv run pytest -q
Metadata
Release files for lintel-api 0.1.0a7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lintel_api-0.1.0a7.tar.gz | 206.3 kB | With provenance | Details for lintel_api-0.1.0a7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lintel_api-0.1.0a7-py3-none-any.whl | Python 3 | none | any | Details for lintel_api-0.1.0a7-py3-none-any.whl |
Total release size: 300.9 kB
Release files / lintel_api-0.1.0a7.tar.gz
| Download URL | lintel_api-0.1.0a7.tar.gz |
|---|---|
| Size | 206.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e5303e448a72d3b65af5e4ba745388af3180f67a5a5c6f297fd6c6e14a2c6d1
|
|
BLAKE2b-256 checksum How to use checksums |
ef35fcd464ae78e3d0ba6e660aa262799649f9f6b80cfd62f3308cabc79d69ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 12, 2026.
Transparency logRelease files / lintel_api-0.1.0a7-py3-none-any.whl
| Download URL | lintel_api-0.1.0a7-py3-none-any.whl |
|---|---|
| Size | 94.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
988079cdf7f7679239ab5ac12c66b2cd18f4c48e4a3b36e0008cbe44283058c8
|
|
BLAKE2b-256 checksum How to use checksums |
84e087b7313854526e209356e5b99489291c4b1588a752b8a645eb04d4a866d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 12, 2026.
Transparency logSecurity for lintel-api 0.1.0a7
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lintel_api-0.1.0a7.tar.gz
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 Nov 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.