Skip to main content

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:

  1. Place the updated Swagger 2.0 spec in swagger_files/swagger.json
  2. Run make convert to produce the OpenAPI 3.1 spec
  3. Run make generate to regenerate the Python client

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cnaas_nms_api_client-0.1.2.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cnaas_nms_api_client-0.1.2-py3-none-any.whl (94.5 kB view details)

Uploaded Python 3

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

Hashes for cnaas_nms_api_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 231f9fe7db72b2e57ae8a905451e5421bf3f22622bf70591bd5cd241459520b5
MD5 519f2d1aad4369d0dd637cfdc619a297
BLAKE2b-256 1b41aff11547b48db1bfe227f082f28f4415162b0d9489eac0ef1145edd9c485

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cnaas_nms_api_client-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cnaas_nms_api_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f8d4396622d995565cf4c6264c018d06af56b451a114d612699beed6a2b8b6e8
MD5 ca7af6bd0868d9720b88351d5591ecac
BLAKE2b-256 1b3f2418a33678fa4efd715945f2d58eac3613dac0c505a83431470e07b4e80b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page