Skip to main content

Invariant Website

Project description

Invariant CLI and Python SDK

Installation

The Invariant client is available as a Python package. You can install it through pip or pipx like so:

pip install invariant

# Or using pipx
pipx install invariant

The Invariant CLI can be used to run Invariant from your test automation workflow. This example shows one way to install it for Github Actions:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
  with:
    python-version: '3.11'
    cache: 'pip'
- name: Install dependencies
  run: python -m pip install --upgrade pip invariant
- name: Evaluate current directory using Invariant
  run: |
    python -m invariant run

Usage: Command Line Interface

The Invariant CLI can analyize local changes to network configuration files.

$ invariant login
Open this link in your browser to log in:
https://invariant.test/login?code=320664
Login successful.

$ invariant run
Uploading snapshot...
Processing... (51643c3e-9a08-47b9-968e-1d2d7e2ca42e)
Analysis complete.

+---------------+----------+
| File          | RowCount |
+---------------+----------+
| exposed_ports |       15 |
+---------------+----------+

$ invariant show exposed_ports --json
# JSON report here

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

invariant_client-1.1.1.tar.gz (47.0 kB view hashes)

Uploaded Source

Built Distribution

invariant_client-1.1.1-py3-none-any.whl (130.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page