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.1

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.1
File Size Uploaded Provenance Actions
nac_cli-0.2.1.tar.gz 108.9 kB Without provenance Details for nac_cli-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 151.4 kB

Release files / nac_cli-0.2.1.tar.gz

Download URL nac_cli-0.2.1.tar.gz
Size 108.9 kB
Tags Source
SHA-256 checksum
How to use checksums
04eb8d9b1a8b405a898484a8f70d5efaaa5fb17f949f056a1fa45104d1326247
BLAKE2b-256 checksum
How to use checksums
567b6822f231fb11aa5c3285002d52bdd4c49a3c237c2c5490c0bf982afdebb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1-py3-none-any.whl

Download URL nac_cli-0.2.1-py3-none-any.whl
Size 42.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2668bd0f0cbe2ba2bb87fdd5d46c7dcc3d0ff44d8f5edc3dafaca8a0d54245d
BLAKE2b-256 checksum
How to use checksums
7d743ff4c6523977ef7a0338488e4eb2dee9c0e2bfa8718bdc3b51fbc39b1d25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1

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