The NWA-stdlib module.
Project description
Network Automation Standard Library
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
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 nwa_stdlib-1.11.1.tar.gz.
File metadata
- Download URL: nwa_stdlib-1.11.1.tar.gz
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.33.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8831533d88c80bd6cafcdf99c4a7d626ff335ab96746cf28aefd8acdce2230d4
|
|
| MD5 |
17a464867faa093f1ca848c3826c5415
|
|
| BLAKE2b-256 |
eb4df3717c6c404495e1975fdb597fdafce11250571a4e6a8b2fc64bf9c69193
|
File details
Details for the file nwa_stdlib-1.11.1-py3-none-any.whl.
File metadata
- Download URL: nwa_stdlib-1.11.1-py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.33.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3cc63803ed6abffca6d71fc962f825287b14c497a68e8f46f1db579b26d4e9b
|
|
| MD5 |
ed56999a6d817ba48e85eaba2b47968b
|
|
| BLAKE2b-256 |
b7d97457e1ea0a81b5a4224c964481117b42515f234d70a84f7de35c747733cf
|