Skip to main content

aiopnsense

GitHub Release GitHub Release Date GitHub Activity Coverage Documentation License

PyPI

aiopnsense is an async Python client library for OPNsense.

What this library does

aiopnsense wraps supported OPNsense REST endpoints behind a single async client, OPNsenseClient. It is designed for applications that need to query router state or trigger supported OPNsense actions without manually building HTTP requests.

The client currently includes helpers for:

  • system information, notices, certificates, CARP, Wake-on-LAN, reboot, and interface reloads
  • firmware version checks, update status, and upgrade actions
  • interface, gateway, CPU, memory, filesystem, and temperature telemetry
  • diagnostics traffic snapshots and live interface traffic stream samples
  • DHCP lease and ARP table access
  • firewall rules, NAT rules, alias toggling, and state killing
  • service status lookup and service start/stop/restart operations
  • SMART device listing and per-device SMART detail queries
  • Unbound blocklist management
  • OpenVPN and WireGuard status plus VPN instance toggling
  • vnStat metrics, captive portal vouchers, and speed test data

Requirements

  • Requires OPNsense Firmware >= 25.1

  • Recommended OPNsense Firmware >= 26.1.1

    • For firmware < 26.1.1, the Firewall and NAT methods will return empty data.

Documentation

Live test scripts

The scripts/ directory includes live diagnostic helpers for maintainers:

  • aiopnsense_dump.py runs supported aiopnsense client endpoints and prints the raw data returned by the library.
  • opnsense_api_call.py calls an arbitrary OPNsense API endpoint with a specified method and optional POST payload.

Both scripts read credentials from scripts/aiopnsense.env by default. Copy scripts/aiopnsense.env.example to create your local env file; it is ignored by git. Full CLI reference is in the Read the Docs script documentation.

Origin and Purpose

aiopnsense was extracted from the hass-opnsense integration. It is primarily used as an external dependency by hass-opnsense and Home Assistant for its OPNsense Integration.

Download files

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

Source Distribution

aiopnsense-1.1.4.tar.gz (138.5 kB view details)

Uploaded Source

Built Distribution

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

aiopnsense-1.1.4-py3-none-any.whl (73.5 kB view details)

Uploaded Python 3

File details

Details for the file aiopnsense-1.1.4.tar.gz.

File metadata

  • Download URL: aiopnsense-1.1.4.tar.gz
  • Upload date:
  • Size: 138.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for aiopnsense-1.1.4.tar.gz
Algorithm Hash digest
SHA256 ce04012643f66fe5f1e0a933a0a2271c1a231b9bd51207ba35d9a34661fcf617
MD5 3bce98794f66a861611d68c8bb950153
BLAKE2b-256 5fc8492c8508314f460f410bb09d1e9cab757b8f7fe697a716865ad13dc714c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiopnsense-1.1.4.tar.gz:

Publisher: release.yml on Snuffy2/aiopnsense

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

File details

Details for the file aiopnsense-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: aiopnsense-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 73.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for aiopnsense-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a8d92fcf379581f640305d52a9e6b7ce8174e5fb4af559cfaef41c5285c7df68
MD5 8e9b7b74e1d99424c8b92e74cf06ded1
BLAKE2b-256 c5c64d5e1baa192474f4678d8641f0a27b1442f5e49ad47b12c5c82867c521d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiopnsense-1.1.4-py3-none-any.whl:

Publisher: release.yml on Snuffy2/aiopnsense

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

Supported by

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