OpenNodes Node Kit (Python) — MVP
Implements REQ-003 (subset): a reverse proxy that turns any OpenAI-compatible engine
(vLLM, TGI, Ollama — all expose /v1) into a conforming ONP Node without touching the engine.
Requires Python ≥3.11. Dependencies: aiohttp, cryptography.
What it does
onp-node init— interrogates the engine's/v1/models, writesonp-node.toml(operator fills in pricing / data policy / identity) and generates an Ed25519 signing key.onp-node serve— serves the signed Node Card at/.well-known/open-node.json, JWKS, the HTTP challenge endpoint,/onp/health, and proxies/v1/models+/v1/chat/completionswith the ONP layer: header validation (409offering-mismatch/price_changed), usage accounting (engineusagepassed through; approximated when the engine omits it), and signed receipts — inline JWS header for non-streaming, by-URL (/onp/receipts/{id}, materialized after the stream ends) for streaming. Plain OpenAI traffic without ONP headers passes untouched (NK-INV-02) — existing engine users are unaffected.onp-node check— client-side Stage A self-test (card, signature, health, models agreement, blind invocation with usage + receipt);registerrefuses to submit while it fails (NK-REG-04,--forceoverrides).onp-node register <registry>— submits the card URL, stages the HTTP challenge token (the kit serves it itself), completes verification, prints the resulting tier + Stage A verdict.
Cross-language proof
tests/test_e2e.py runs a mock engine → the kit → the real JS registry as a subprocess:
registration, challenge, card signature verification across languages (Python Ed25519
signer, JS verifier, byte-identical stable JSON), Stage A pass to community, search with
real pricing, pinned invoke with Python-verified receipt math, streaming receipt-by-URL,
both 409s, and untouched plain-OpenAI traffic.
python -m venv .venv
.venv\Scripts\python -m pip install aiohttp cryptography
.venv\Scripts\python -m unittest discover -s tests
Real deployment (e.g. Ollama on this machine)
pipx install onp-node # from PyPI; from a checkout: pipx install ./node-kit
onp-node init --engine http://127.0.0.1:11434/v1 --id org.example.mybox --public-url https://ai.example.org
# review onp-node.toml (pricing, data_policy), then:
onp-node serve # add --mdns (pip install 'onp-node[mdns]') so LAN clients such as onp-ollama discover it
onp-node check
onp-node register https://registry.example.org
MVP shortcuts (vs REQ-003)
- Prepaid API-key management (
onp-node keys), free-tier rate limiting, probe-allowance accounting, Prometheus metrics, status UI: not yet built (NK-PAY-02/03, NK-INV-04, NK-REG-05). - Engine adapters beyond the OpenAI-compatible surface (Ollama
/api/tagsfallback, TGI/infodetails, capability probing for tool_calls/vision) are minimal: models come from/v1/modelsonly,supportsdefaults to["streaming"]. - Card revision changes require a serve restart; no
apply/ping-on-revision yet (NK-REG-02). - TLS termination is assumed to happen in front (reverse proxy/ingress).
Metadata
Release files for onp-node 0.1.3
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 | |
|---|---|---|---|---|
| onp_node-0.1.3.tar.gz | 17.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| onp_node-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.6 kB
Release files / onp_node-0.1.3.tar.gz
| Download URL | onp_node-0.1.3.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e36987cfa0c7bc0ba41f2ca6be5408f5d7b75a5f3a9a1ab027517b855886008
|
|
BLAKE2b-256 checksum How to use checksums |
f3508e63e0c0678f952474a36b29dcfa69cee4c5cb87bf90eba28dad6f669f23
|
| 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 Oct 4, 2026.
Transparency logRelease files / onp_node-0.1.3-py3-none-any.whl
| Download URL | onp_node-0.1.3-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2c61d4fa0bef3912f9a1d5f19c3ed1c506758ee2e70ac047bff04835839f261
|
|
BLAKE2b-256 checksum How to use checksums |
f34a8f62817c7770a7279aafd33477c52a056e63dfa38cf1060754bfc392c27d
|
| 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 Oct 4, 2026.
Transparency logSecurity for onp-node 0.1.3
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for onp_node-0.1.3.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 Oct 4, 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.