NanoPing API for Python
A typed client for the REST API of a NanoPing node. It covers every method of the API, with helpers for flows that take more than one call, such as joining a hub. It has a blocking and an asyncio client, and needs Python 3.11 or later.
This repository is generated from the NanoPing sources on every release, and its version matches the NanoPing release it was made from. Changes made here are overwritten by the next release.
Install
pip install nanoping-api
Use
from nanoping_api import NanopingClient
client = NanopingClient("http://127.0.0.1:10565")
local = client.hub_client.get_local_node_id()
for update in client.hub_client.stream_connection_state():
print(update.state)
AsyncNanopingClient has the same methods for asyncio, and its streams are
read with async for. Requests and responses are dataclasses, and the fields of
a request are passed as keyword arguments. A failed call raises an ApiError,
whose code says why, such as Code.NOT_FOUND.
Examples
examples holds the program the
HTTP REST guide is made from. It
joins a node to a hub and manages pipelines on both. Start the two nodes as the
comment in examples/main.py describes, then run
pip install nanoping-api
python examples/main.py --client http://127.0.0.1:10565 --server http://127.0.0.1:10566
The API is documented at https://docs.nanoping.com/api/reference.
Metadata
Release files for nanoping-api 12.0.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 |
|---|---|---|---|---|
| nanoping_api-12.0.0.tar.gz | 37.4 kB | With provenance | Details for nanoping_api-12.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nanoping_api-12.0.0-py3-none-any.whl | Python 3 | none | any | Details for nanoping_api-12.0.0-py3-none-any.whl |
Total release size: 73.7 kB
Release files / nanoping_api-12.0.0.tar.gz
| Download URL | nanoping_api-12.0.0.tar.gz |
|---|---|
| Size | 37.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
798aa10342612d74203e470604e15c38edba258d84af877515a057a1d7b60d16
|
|
BLAKE2b-256 checksum How to use checksums |
a39269c694ce265dc3bb309a3191ed1668cb28dfc60d70d8dcc0bebd283e1c02
|
| 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 3, 2026.
Transparency logRelease files / nanoping_api-12.0.0-py3-none-any.whl
| Download URL | nanoping_api-12.0.0-py3-none-any.whl |
|---|---|
| Size | 36.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
647e3994265e99681893e74ff2cf7d6d4b2322443a3029f1e58a1f4592a38abd
|
|
BLAKE2b-256 checksum How to use checksums |
1868abb156b4326a2c2c53fe455a2e53000754cfb26dcb36a67940bcdd3e0c1d
|
| 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 3, 2026.
Transparency logSecurity for nanoping-api 12.0.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 nanoping_api-12.0.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 3, 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.