Skip to main content

cisco-nso-restconf

Overview

This Python library provides an interface for interacting with the Cisco Network Services Orchestrator (NSO) RESTCONF API.

Features

  • RESTCONF API Access: Use the NSORestconfClient class to make raw GET, POST, & DELETE requests to any RESTCONF /data resource.
  • Utility Classes: Use pre-built helper classes, such as the Devices class, or Query class, to simplify common operations, like fetching all device NED ID's.

Requirements

  • NSO RESTCONF Configuration
    • To use this library, RESTCONF must be enabled in NSO. Please refer to the documentation specific to the NSO version being used to determine how to enable RESTCONF in NSO.

Installation

You can install the library using pip:

pip install cisco-nso-restconf

Client Class

Use the NSORestconfClient class to interact with the NSO RESTCONF API /data resource

Methods Supported

  • GET, POST, DELETE

Utility Classes

To make the process easier, the library also provides utility classes for specific tasks. For example, the Devices class simplifies interaction with tailf-ncs:devices RESTCONF resources.

Available Utility Classes

Class Description
Devices Interact with the NSO tailf-ncs:devices resource
Query Interact with the NSO tailf-ncs:query resource

Closing Sessions

When using the NSORestconfClient, it’s important to close the session when you’re done to free up resources. You can do this using the close() method, as shown in the examples above.

Examples

There are a number of examples provided for utilizing the Client classes and various Helper classes, such as the Devices class. The examples are intended to showcase basic use cases/workflows for achieving a specific function in NSO, such as retrieving NED ID's, device groups, life cycle of a VLAN resource, life cycle of a service, and so on.

Running Examples

To run the examples, you'll need to install the development dependencies which include the rich library for enhanced terminal output. Use UV to install these dependencies:

uv sync

This will install all required dependencies, including those needed for the examples. Without installing the development dependencies, the examples that use the rich library for output formatting will not work.

Contributing

We welcome contributions! Feel free to open issues or submit pull requests. For development, we recommend using UV to manage dependencies and packaging.

uv sync

License

This project is licensed under the MIT License.

Metadata

Release files for cisco-nso-restconf 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cisco-nso-restconf 1.0.5
File Size Uploaded
cisco_nso_restconf-1.0.5.tar.gz 57.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cisco-nso-restconf 1.0.5
File Interpreter ABI Platform
cisco_nso_restconf-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 66.3 kB

Release files / cisco_nso_restconf-1.0.5.tar.gz

Download URL cisco_nso_restconf-1.0.5.tar.gz
Size 57.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b8603780c0a729282a50aa40419bc7c27b3bb3a8f85e7a512723d63ede8bd5d8
BLAKE2b-256 checksum
How to use checksums
40481250b98e2c81f10c3e72a438d7e91e5c2af5b45128ec5a48593a8d3e14d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.26

Release files / cisco_nso_restconf-1.0.5-py3-none-any.whl

Download URL cisco_nso_restconf-1.0.5-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f36c97ca8b8f542f2aeda58459fdb49e37ee73d3b2a223ad1f8c4e6d8d1df87
BLAKE2b-256 checksum
How to use checksums
cf7d5297266fb2eee76c4797d27cfc5d59f74dd7e98ae2b55da4e44f0ae46cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.26

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page