Skip to main content

Tests Python Support

nac

An umbrella CLI for Network-as-Code workflows, driven by a single nac.yaml config file.

Every Network-as-Code repository runs the same workflow, regardless of the architecture: validate the data model, plan, apply and test. Each step uses a different tool with its own options: terraform or tofu, nac-validate and nac-test. nac is a single CLI for the whole workflow. The repository is described once in nac.yaml, and the same commands work on a laptop and in a CI/CD pipeline:

nac setup       # verify prerequisites and report resolved tool versions
nac init        # terraform/tofu init
nac validate    # nac-validate against the configured data paths
nac plan        # terraform/tofu plan -> plan.tfplan
nac apply       # apply the saved plan (or interactively, without one)
nac test        # nac-test against the configured data/templates/output
nac destroy     # destroy the managed infrastructure

Full documentation: https://netascode.cisco.com/docs/tools/nac/overview

How It Works

  • One configuration file: nac.yaml defines where the data model, schema, rules and test templates are located, which Terraform engine to use and which environment variables are required. Every field has a default, so a repository following the data/ and tests/ conventions works without a nac.yaml at all.
  • Managed toolchain: nac-validate and nac-test are used from a local installation if one satisfies the configured version, or run via uvx otherwise. If neither terraform nor tofu is installed, nac setup can install OpenTofu.
  • Tested versions: a Network-as-Code Terraform module can declare the nac-validate and nac-test versions it was tested with in nac/manifest.yaml. nac then uses a compatible version by default and warns about versions outside of the tested range.
  • Pass-through: arguments not known to nac are forwarded to the wrapped tool, and the exit code of the wrapped tool is returned.

Installation

nac is published on PyPI as nac-cli; the command it installs is nac. Install it with uv:

uv tool install nac-cli

See the installation docs for prerequisites, and usage and configuration for the full command and nac.yaml reference.

License

MPL-2.0

Metadata

Release files for nac-cli 0.2.3

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

Source distribution (sdist)

Source distribution for nac-cli 0.2.3
File Size Uploaded Provenance Actions
nac_cli-0.2.3.tar.gz 112.9 kB Without provenance Details for nac_cli-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nac-cli 0.2.3
File Interpreter ABI Platform Actions
nac_cli-0.2.3-py3-none-any.whl Python 3 none any Details for nac_cli-0.2.3-py3-none-any.whl

Total release size: 157.7 kB

Release files / nac_cli-0.2.3.tar.gz

Download URL nac_cli-0.2.3.tar.gz
Size 112.9 kB
Tags Source
SHA-256 checksum
How to use checksums
034a4a6ccd9200adfb6a9c3d5cdf2ba2fae7360ab479a0879fb4cea6293b863c
BLAKE2b-256 checksum
How to use checksums
b257976e92e77eaf12a7d1b05ac937ae18c5c19ea4dbf90c16d1661451bd4bbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nac_cli-0.2.3-py3-none-any.whl

Download URL nac_cli-0.2.3-py3-none-any.whl
Size 44.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e32d7b2d008537d6829d019ce5ca4881bf01bbe341ad919f29f0a6f1ef42e702
BLAKE2b-256 checksum
How to use checksums
962f219762fc61cb6c5c630a96e1a8eb6dc42db78997aa4ae7b4c2938940b4f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for nac-cli 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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