Skip to main content

The NWA-stdlib module.

Project description

Network Automation Standard Library

pypi_version Supported python versions codecov

This library contains the functions and utilities that are shared by most Network Automation projects built at SURF.

Installation

To install the package from PyPI:

pip install nwa-stdlib

Development

Virtual Environment

Steps to setup a virtual environment.

Step 1:

Create and activate a python3 virtualenv.

Step 2:

Install flit to enable you to develop on this repository:

pip install flit

Step 3:

To install all development dependencies:

flit install --deps develop

All steps combined into 1 command:

python -m venv .venv && source .venv/bin/activate && pip install -U pip && pip install flit && flit install --deps develop

Unit tests

Activate the virtualenv and run the unit tests with:

pytest

Pre-commit

This project uses pre-commit to automatically run a number of checks before making a git commit. The same checks will be performed in the CI pipeline so this can save you some time.

First ensure you have pre-commit installed. It is recommended to install it outside the virtualenv. On Linux and Mac, pre-commit is available in most package managers. Alternatively you can install it globally with pipx.

Once pre-commit is installed, go into the project root and enable it:

pre-commit install

This should output pre-commit installed at .git/hooks/pre-commit. The next time you run git commit the pre-commit hooks will validate your changes.

Bump version

Depending on the feature type, run bumpversion (patch|minor|major) to increment the version you are working on. For example to update the increment the patch version use

bumpversion patch

Supported Python versions

nwa-stdlib must support the same python versions as orchestrator-core.

Exceptions to this rule are:

  • A new python version is released: nwa-stdlib should support the new version before orchestrator-core does
  • Support for an old python version is dropped: nwa-stdlib should drop the python version after orchestrator-core does

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

nwa_stdlib-1.12.0.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

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

nwa_stdlib-1.12.0-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file nwa_stdlib-1.12.0.tar.gz.

File metadata

  • Download URL: nwa_stdlib-1.12.0.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nwa_stdlib-1.12.0.tar.gz
Algorithm Hash digest
SHA256 16210da5ae5fb7192d9d4676d89ad64ba4e6f95ddbb4b03253642bef00af28da
MD5 e51b05794f0a04f137688517d9bf252c
BLAKE2b-256 2d7ce9849a9f5f9c8ccea1ca770f07ebd3b97abdb7023365e66f85847f31734a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nwa_stdlib-1.12.0.tar.gz:

Publisher: publish-release.yaml on workfloworchestrator/nwa-stdlib

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

File details

Details for the file nwa_stdlib-1.12.0-py3-none-any.whl.

File metadata

  • Download URL: nwa_stdlib-1.12.0-py3-none-any.whl
  • Upload date:
  • Size: 29.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nwa_stdlib-1.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d498ef1c123610532e03844e85bde326a5d3fe2bc0be1aa817427169831d258e
MD5 d34b4351d222666eb5eb53345703c8fb
BLAKE2b-256 026ff1ef9d5ca08d891ef7233aeb7ea836ee8e3b2f053fcbe228d713abecf57f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nwa_stdlib-1.12.0-py3-none-any.whl:

Publisher: publish-release.yaml on workfloworchestrator/nwa-stdlib

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