Skip to main content

naos api

The control plane of naos. It owns Runs and the immutable policy each Run is created with, the image catalog, the profiles and the audit trail, and it is the only thing runners talk to: they register, lease Runs, report transitions and push events through it.

The service is FastAPI over SQLModel, with no state of its own besides the database. Operator routes live under /api/v1 behind a bearer token, the runner interface under /api/v1/runners behind a token each runner is issued at registration.

Install

pip install "naos-api[server]"

The server extra adds uvicorn and the psycopg driver, which the library itself does not need. The published image carries both:

docker pull ghcr.io/oberon-systems/naos-api

Configure

Settings are read from NAOS_* environment variables once per process. Both token settings hold a SHA-256, never the token; while one is unset, the routes behind it answer 401.

Variable Default Meaning
NAOS_DATABASE_URL required For example postgresql+psycopg://naos@db.example.com/naos
NAOS_ALLOWED_MOUNT_ROOTS [] Host directories a mount policy may name
NAOS_OPERATOR_TOKEN_SHA256 unset SHA-256 of the operator token
NAOS_RUNNER_ENROLLMENT_TOKEN_SHA256 unset SHA-256 of the enrollment token
NAOS_LEASE_TTL_SECONDS 60 Lease extension per heartbeat, 5 to 3600

The full table, the endpoints and the runner interface are in docs/03-api-design.md.

Run

export NAOS_DATABASE_URL=postgresql+psycopg://naos@127.0.0.1/naos
export NAOS_OPERATOR_TOKEN_SHA256=$(printf %s "$NAOS_OPERATOR_TOKEN" | sha256sum | cut -d' ' -f1)
uvicorn --factory naos_api.app:create_app --host 127.0.0.1

create_app() builds the application and starts the background sweep that expires runner leases; the schema is created on startup.

Metadata

Release files for naos-api 0.1.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 naos-api 0.1.0
File Size Uploaded Provenance Actions
naos_api-0.1.0.tar.gz 42.3 kB With provenance Details for naos_api-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for naos-api 0.1.0
File Interpreter ABI Platform Actions
naos_api-0.1.0-py3-none-any.whl Python 3 none any Details for naos_api-0.1.0-py3-none-any.whl

Total release size: 76.6 kB

Release files / naos_api-0.1.0.tar.gz

Download URL naos_api-0.1.0.tar.gz
Size 42.3 kB
Tags Source
SHA-256 checksum
How to use checksums
02e7ffdaa9274b38225340b880b15fe841f624debc3f6696749efb1b973cd44d
BLAKE2b-256 checksum
How to use checksums
5a96f21e42ba43fbee981fbc6f9ea84ba9115c9e9248454deaf08296f1896cfc
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 20, 2026.

Transparency log

Release files / naos_api-0.1.0-py3-none-any.whl

Download URL naos_api-0.1.0-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f2b19ec0d0d26f6d5214044535ab248136830cf5726d7d6dc9519ab45381f7a
BLAKE2b-256 checksum
How to use checksums
b0921f4c980ae3e2c507715177758ea7053de3255ed6aae861c60a95ca7d612b
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 20, 2026.

Transparency log

Security for naos-api 0.1.0

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.

Select from 2 files

Attestation for naos_api-0.1.0.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 Sep 20, 2026.

Transparency log

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

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