A Python client library for the CNaaS NMS API
Project description
cnaas-nms-api-client
A typed Python client library for the CNaaS NMS API, auto-generated from the OpenAPI specification using openapi-python-client.
Installation
pip install cnaas-nms-api-client
Or install directly from GitHub:
pip install git+https://github.com/acidjunk/cnaas-nms-api-client.git
Usage
from cnaas_nms_api_client import AuthenticatedClient
from cnaas_nms_api_client.api.devices import get_devices_api
client = AuthenticatedClient(
base_url="https://your-cnaas-instance/api/v1.0",
token="your-api-token",
)
# Example: list devices
response = get_devices_api.sync_detailed(client=client)
print(response.status_code)
Every endpoint has both sync_detailed and asyncio_detailed variants for synchronous and async usage.
Development
This project uses uv for dependency management.
# Clone and install
git clone https://github.com/acidjunk/cnaas-nms-api-client.git
cd cnaas-nms-api-client
uv sync
# Regenerate client from OpenAPI spec
make generate
# Build package
make build
# Lint
make lint
Regenerating the Client
If the upstream CNaaS NMS API changes:
- Place the updated Swagger 2.0 spec in
swagger_files/swagger.json - Run
make convertto produce the OpenAPI 3.1 spec - Run
make generateto regenerate the Python client
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cnaas_nms_api_client-0.1.2.tar.gz.
File metadata
- Download URL: cnaas_nms_api_client-0.1.2.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
231f9fe7db72b2e57ae8a905451e5421bf3f22622bf70591bd5cd241459520b5
|
|
| MD5 |
519f2d1aad4369d0dd637cfdc619a297
|
|
| BLAKE2b-256 |
1b41aff11547b48db1bfe227f082f28f4415162b0d9489eac0ef1145edd9c485
|
Provenance
The following attestation bundles were made for cnaas_nms_api_client-0.1.2.tar.gz:
Publisher:
publish.yml on acidjunk/cnaas-nms-api-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cnaas_nms_api_client-0.1.2.tar.gz -
Subject digest:
231f9fe7db72b2e57ae8a905451e5421bf3f22622bf70591bd5cd241459520b5 - Sigstore transparency entry: 952248008
- Sigstore integration time:
-
Permalink:
acidjunk/cnaas-nms-api-client@b0a7fa5be7b651b05635ca108b4db09e838f1228 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/acidjunk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b0a7fa5be7b651b05635ca108b4db09e838f1228 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cnaas_nms_api_client-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cnaas_nms_api_client-0.1.2-py3-none-any.whl
- Upload date:
- Size: 94.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8d4396622d995565cf4c6264c018d06af56b451a114d612699beed6a2b8b6e8
|
|
| MD5 |
ca7af6bd0868d9720b88351d5591ecac
|
|
| BLAKE2b-256 |
1b3f2418a33678fa4efd715945f2d58eac3613dac0c505a83431470e07b4e80b
|
Provenance
The following attestation bundles were made for cnaas_nms_api_client-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on acidjunk/cnaas-nms-api-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cnaas_nms_api_client-0.1.2-py3-none-any.whl -
Subject digest:
f8d4396622d995565cf4c6264c018d06af56b451a114d612699beed6a2b8b6e8 - Sigstore transparency entry: 952248014
- Sigstore integration time:
-
Permalink:
acidjunk/cnaas-nms-api-client@b0a7fa5be7b651b05635ca108b4db09e838f1228 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/acidjunk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b0a7fa5be7b651b05635ca108b4db09e838f1228 -
Trigger Event:
push
-
Statement type: