Cato Networks cli wrapper for the GraphQL API.
Project description
Cato Networks GraphQL API CLI
The package provides a simple to use CLI that reflects industry standards (such as the AWS cli), and enables customers to manage Cato Networks configurations and processes via the Cato Networks GraphQL API easily integrating into configurations management, orchestration or automation frameworks to support the DevOps model.
Installation
pip3 install catocli
Authentication
The Cato CLI uses a profile-based authentication system similar to AWS CLI. You can configure multiple profiles for different environments or accounts.
Quick Setup
# Configure your first profile (interactive)
catocli configure set
# Or configure non-interactively
catocli configure set --cato-token "your-api-token" --account-id "12345"
Profile Management
# List profiles
catocli configure list
# Switch profiles
catocli configure use prod
# Show current profile
catocli configure show
Legacy Environment Variables (deprecated)
For backward compatibility, you can still use environment variables:
export CATO_TOKEN="12345-abcde-12345-abcde"
export CATO_ACCOUNT_ID="12345"
export CATO_DEBUG=True # Optional for debug logs
The CLI will automatically migrate these to a default profile on first run.
Documentation
For detailed information about profile management, see PROFILES.md.
CLICK HERE to see how create an API key to authenticate.
Running the CLI
catocli -h
catocli query -h
catocli query entityLookup -h
catocli query entityLookup '{"type":"country"}`
// Override the accountID value as a cli argument
catocli query entityLookup -accountID=12345 '{"type":"country"}`
Check out run locally not as pip package
git clone git@github.com:Cato-Networks/cato-cli.git
cd cato-cli
python3 -m catocli -h
This CLI is a Python 3 application and has been tested with Python 3.6 -> 3.8
Requirements:
python 3.6 or higher
Confirm your version of python if installed:
Open a terminal
Enter: python -V or python3 -V
Usage:
usage: catocli <resource> <command> [options]
CLI for query, and mutation operations via API.
Positional arguments:
{entityLookup}
entityLookup entityLookup reference.
Optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
Installing the correct version for environment:
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 catocli-3.0.13.tar.gz.
File metadata
- Download URL: catocli-3.0.13.tar.gz
- Upload date:
- Size: 6.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44442410ca0299d30d3bcd678034397555be359e78c6d9437e4e7a2e31e5ef4b
|
|
| MD5 |
a38014f9ccca3ee0d98f646561cb2bcc
|
|
| BLAKE2b-256 |
77b7128c104822cdc9a1c115ae66ed8917373f71cc88d737c59c5a21a3403764
|
Provenance
The following attestation bundles were made for catocli-3.0.13.tar.gz:
Publisher:
publish-to-pypi.yml on catonetworks/cato-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
catocli-3.0.13.tar.gz -
Subject digest:
44442410ca0299d30d3bcd678034397555be359e78c6d9437e4e7a2e31e5ef4b - Sigstore transparency entry: 597812197
- Sigstore integration time:
-
Permalink:
catonetworks/cato-cli@f8db176c30de6b91fd115c1d6c80e90bc88fe3c1 -
Branch / Tag:
refs/tags/v3.0.13 - Owner: https://github.com/catonetworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f8db176c30de6b91fd115c1d6c80e90bc88fe3c1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file catocli-3.0.13-py3-none-any.whl.
File metadata
- Download URL: catocli-3.0.13-py3-none-any.whl
- Upload date:
- Size: 7.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
351d58418d189a1db0e2bb8ad0519e2979cbb820d38575f07b168c92b1943fca
|
|
| MD5 |
329f7932acbd5097bf4bc693fde34cd5
|
|
| BLAKE2b-256 |
ada4be99e3e2e10bb394a6c6c8f9aa8bd24231278b67724abb375a53ae64cf02
|
Provenance
The following attestation bundles were made for catocli-3.0.13-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on catonetworks/cato-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
catocli-3.0.13-py3-none-any.whl -
Subject digest:
351d58418d189a1db0e2bb8ad0519e2979cbb820d38575f07b168c92b1943fca - Sigstore transparency entry: 597812201
- Sigstore integration time:
-
Permalink:
catonetworks/cato-cli@f8db176c30de6b91fd115c1d6c80e90bc88fe3c1 -
Branch / Tag:
refs/tags/v3.0.13 - Owner: https://github.com/catonetworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f8db176c30de6b91fd115c1d6c80e90bc88fe3c1 -
Trigger Event:
release
-
Statement type: