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_DATABASE_AUTO_MIGRATE |
false |
Bring an empty database to the schema on start |
NAOS_ALLOWED_MOUNT_ROOTS |
[] |
Host directories a mount policy may name |
NAOS_OPERATOR_TOKEN_SHA256 |
unset | SHA-256 of the operator token, which only logs in |
NAOS_MASTER_KEYS |
{} |
Keys operator credentials derive from, by id, as JSON |
NAOS_MASTER_KID |
unset | The key that issues new credentials |
NAOS_CACHE_URL |
unset | Redis URL for used nonces; unset keeps them in the process |
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)
naos-api migrate
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. It refuses to start on a database that is not at the
schema this package ships; naos-api migrate brings it there, see
Schema.
Metadata
Release files for naos-api 0.3.0
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 |
|---|---|---|---|---|
| naos_api-0.3.0.tar.gz | 127.5 kB | With provenance | Details for naos_api-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| naos_api-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for naos_api-0.3.0-py3-none-any.whl |
Total release size: 222.4 kB
Release files / naos_api-0.3.0.tar.gz
| Download URL | naos_api-0.3.0.tar.gz |
|---|---|
| Size | 127.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86a06b566b8bba5cb2b1e06021a667c66f94890890076c334cd90598052cce95
|
|
BLAKE2b-256 checksum How to use checksums |
bd6c12c7b0f69417dc84d85fbeb7f78ef26676328983028329ce28af9da20dc9
|
| 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 29, 2026.
Transparency logRelease files / naos_api-0.3.0-py3-none-any.whl
| Download URL | naos_api-0.3.0-py3-none-any.whl |
|---|---|
| Size | 94.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f30373ea964b7cc9ea8e07d27b621c00fd002ccdaf3fd238850824422370b9dd
|
|
BLAKE2b-256 checksum How to use checksums |
df3ab30b1f660a76213f4d1f67f53d30d2decc42e50ef66f21203bd3995c58be
|
| 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 29, 2026.
Transparency logSecurity for naos-api 0.3.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.
Attestation for naos_api-0.3.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 Nov 29, 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.