aiopnsense
Async Python client library for OPNsense
Decision gist · record as of 2026-08-14
Yes, if you need to programmatically interact with OPNsense and are running firmware 25.1 or later. The library is actively maintained, has low install friction, permissive licensing, and no known vulnerabilities. The async design and broad endpoint coverage make it suitable for integration into monitoring, automation, and Home Assistant deployments. Verify that your OPNsense firmware version meets the minimum requirement and that the endpoints you need are supported.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires OPNsense Firmware >= 25.1; Firmware >= 26.1.1 recommended for full Firewall and NAT method support.
- Low install friction with a pure-Python wheel.
- Active maintenance: released 6 days ago with a recent commit on 2026-08-10.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 is permissive, allowing commercial and private use with minimal restrictions—suitable for most deployment contexts.
last release 2026-08-08 (6 days) · last repo commit 2026-08-10 · 2 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 115,670 downloads/mo, #12,238 on PyPI
Alternatives
Verify before relying
pip install aiopnsense
from aiopnsense import OPNsenseClient
import aiohttp
async with aiohttp.ClientSession() as session:
client = OPNsenseClient(session, host, key, secret)
system_info = await client.system_info()- Whether the library's coverage of OPNsense endpoints is complete or if some actions require manual API calls.
- Performance characteristics when querying large datasets (e.g., many firewall rules or ARP table entries).
- Whether error handling and retry logic are built in for transient network failures.
What it is and what it does
aiopnsense is an async Python client for OPNsense, a firewall and router platform. It abstracts the OPNsense REST API behind a single async client object, OPNsenseClient, so you can query router state and trigger actions programmatically without building HTTP requests by hand. The library covers system information, firmware management, interface and hardware telemetry, diagnostics, DHCP and ARP tables, firewall and NAT rules, service control, SMART queries, Unbound blocklists, VPN status, and other operations.
The package depends on aiohttp for async HTTP, awesomeversion for version handling, and python-dateutil for timestamp parsing. It requires OPNsense Firmware 25.1 or later; firmware 26.1.1 or later is recommended because earlier versions return empty data for Firewall and NAT methods. The library is actively maintained and was extracted from the hass-opnsense Home Assistant integration, where it serves as the primary external dependency.
Use it for
- Monitor router health and interface metrics from a Python application without writing raw HTTP calls.
- Automate firewall rule or NAT rule management in response to application events.
- Query DHCP leases and ARP tables to track network device state programmatically.
- Control VPN instances (OpenVPN, WireGuard) or trigger service restarts from a centralized management tool.
- Integrate OPNsense telemetry (CPU, memory, temperature, traffic) into a monitoring or alerting system.
- Fetch firmware version and update status to plan maintenance windows.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to programmatically interact with OPNsense and are running firmware 25.1 or later.
The library is actively maintained, has low install friction, permissive licensing, and no known vulnerabilities. The async design and broad endpoint coverage make it suitable for integration into monitoring, automation, and Home Assistant deployments. Verify that your OPNsense firmware version meets the minimum requirement and that the endpoints you need are supported.
Install
aiopnsense on PyPI
Before you install
Low install friction with a pure-Python wheel. Active maintenance: released 6 days ago with a recent commit on 2026-08-10. Depends on three common async libraries (aiohttp, awesomeversion, python-dateutil), all well-established.
Requires OPNsense Firmware >= 25.1; Firmware >= 26.1.1 recommended for full Firewall and NAT method support.
License in practice
Apache-2.0 is permissive, allowing commercial and private use with minimal restrictions—suitable for most deployment contexts.
Quickstart
pip install aiopnsense
from aiopnsense import OPNsenseClient
import aiohttp
async with aiohttp.ClientSession() as session:
client = OPNsenseClient(session, host, key, secret)
system_info = await client.system_info()
Verify before relying
- Whether the library's coverage of OPNsense endpoints is complete or if some actions require manual API calls.
- Performance characteristics when querying large datasets (e.g., many firewall rules or ARP table entries).
- Whether error handling and retry logic are built in for transient network failures.
Package facts
| License | Apache-2.0 permissive |
| Python support | Capped below the current Python release >=3.14 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesaiohttpawesomeversionpython-dateutil |
| Maintenance | Actively maintained 6 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 115,670 / month, #12,238 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: aiopnsense-1.1.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “opnsense api client”
- aiopnsenseAn async Python client library that wraps OPNsense REST endpoints,…
- codewords-clientA Python client library for the Codewords API with built-in FastAPI…
- twentyc.rpcA client library for consuming 20c's RESTful API, built on top of the…
Give your agent the search over MCP, or paste the wish link into any chat.
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.
See also asusrouter · systembridgeconnector · infoblox-client · f5-icontrol-rest · aioice · mitmproxy-wireguard · aiodhcpwatcher · aioasuswrt · aiovodafone · pysensibo