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.1.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.1-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nwa_stdlib-1.12.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e4ac5044dea2fdc35684e1ac8f9f19e45502ee202a4833eea5aa9ce8eaa30e2f
MD5 51ed5402ecd63a8984fbb0193f0b3bd9
BLAKE2b-256 9fed098e87e8a781ec8ec18ca573f828a888f5590d11d7d3d215602a98598a09

See more details on using hashes here.

Provenance

The following attestation bundles were made for nwa_stdlib-1.12.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: nwa_stdlib-1.12.1-py3-none-any.whl
  • Upload date:
  • Size: 29.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd44f57d140df2a46db132a9cbda0924fff45f5df9c31615da21070a2e8afd7
MD5 20aa736888ff3102cd2c0899b6c4cfd3
BLAKE2b-256 b5f22799a734469c5a491ad99abd4043dff85ebd350720554936e2f9acfc58a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nwa_stdlib-1.12.1-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