Skip to main content

uictlapi

PYPI Docker Image MIT license

Curl-like CLI for the UniFi Controller / UniFi OS Web UI API — with login and CSRF handled for you.

Auth and CSRF come from requests-unifi-auth. This package is only the HTTP CLI: any Web UI / proxy URL, any method. It is not a typed UniFi SDK and does not invent domain commands (routes apply, inventory, multi-controller orchestration).

Live auth/CSRF compatibility against real controllers is tracked in requests-unifi-auth COMPATIBILITY.md.

Installation

pip

pip install uictlapi

Requires requests-unifi-auth>=0.1.5.

Docker

docker run --rm akinfold/uictlapi:latest --help

Usage

Auth string: user:pass@host (or @/path/to/file containing the same).

# Read traffic routes (policy-based routing)
uictlapi get -a 'user:pass@192.168.1.1' --no-verify \
  'https://192.168.1.1/proxy/network/v2/api/site/default/trafficroutes'

# Same via Docker
docker run --rm akinfold/uictlapi:latest get -a 'user:pass@192.168.1.1' --no-verify \
  'https://192.168.1.1/proxy/network/v2/api/site/default/trafficroutes'

# POST JSON body (from string or @file)
uictlapi post -a 'user:pass@192.168.1.1' --no-verify \
  -j '{"enabled":true}' \
  'https://192.168.1.1/proxy/network/v2/api/site/default/some-endpoint'

uictlapi --version

Common flags mirror curl-ish habits: -H / -p / -d / -j / -o / --show-headers / --status-only / --no-verify / -t. Exit status 1 on HTTP ≥ 400, 2 on transport errors.

Releasing

Version lives in pyproject.toml and src/uictlapi/__init__.py. Bump on main first (GitHub Actions → Bump version, or locally with bump-my-version), then:

git tag vX.Y.Z
git push origin vX.Y.Z

The Publish workflow runs tests, uploads to PyPI, pushes multi-arch Docker images (X.Y.Z, X.Y, and latest when appropriate), and creates a GitHub Release.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uictlapi-0.1.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uictlapi-0.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file uictlapi-0.1.1.tar.gz.

File metadata

  • Download URL: uictlapi-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for uictlapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e8f0520bf736111b6fefdb8e8c411230e2b71fd5e24bcf84ee225966ea094b48
MD5 9874404dcd93828df705d54e8d5733d3
BLAKE2b-256 b970a3a80d523e7f4228d658c3cd4d7a4a453c7a694f5760e8f3830e8db49a20

See more details on using hashes here.

Provenance

The following attestation bundles were made for uictlapi-0.1.1.tar.gz:

Publisher: publish.yml on akinfold/uictlapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uictlapi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: uictlapi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for uictlapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b15c2a33c888e334a25a331ca164be2268ca788a5ef0d0519ae98889b31d74ab
MD5 66bed5164c07d1f80e8ce0d0b89ded38
BLAKE2b-256 3fe67d5b26347a18f0033bc4638c79e59e68fb041f9a7a1c28adb5fc283f5a2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for uictlapi-0.1.1-py3-none-any.whl:

Publisher: publish.yml on akinfold/uictlapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.3

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page