fritzconnection
Communicate with the AVM FRITZ!Box
What it is and what it does
fritzconnection is a Python client library for communicating with AVM FRITZ!Box routers using their TR-064 and HTTP APIs. It abstracts the complexity of these protocols, allowing you to execute router actions (network settings, status queries, home automation control) and retrieve device data through simple method calls. The library handles API inspection on startup, converting responses to native Python types, and optionally caches model-specific API metadata to speed up initialization.
The package is designed for developers building automation, monitoring, or integration tools around FRITZ!Box hardware. It supports both synchronous operations and provides library modules that simplify common tasks. Credentials can be sourced from environment variables, and the caching mechanism helps when creating multiple instances or running in resource-constrained environments.
Use it for:
- Automate network tasks like forcing IP renewal or managing port forwarding on a FRITZ!Box router
- Monitor and control home automation devices (lights, switches, thermostats) connected to a FRITZ!Box
- Retrieve device statistics and status information from smart home devices registered with the router
- Integrate FRITZ!Box management into larger home automation or monitoring dashboards
- Build call-monitoring applications that track or log incoming/outgoing calls on the router
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Communicate with AVM FRITZ!Box routers via TR-064 and HTTP interfaces, supporting network management, home automation device control, and call monitoring.
Yes. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and installs with minimal friction. It's well-suited for anyone building FRITZ!Box automation or home automation integrations in Python. The broad Python version support (3.7–3.14) and caching feature make it practical for both simple scripts and production systems.
Install
fritzconnection on PyPI
pip
pip install fritzconnectionuv
uv add fritzconnectionpoetry
poetry add fritzconnectionInstalling fritzconnection
Before you install
Low install friction with a single runtime dependency (requests). Active maintenance with recent commits and a stable production status; supports Python 3.7 through 3.14.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both personal and commercial projects.
Quickstart
pip install fritzconnection
from fritzconnection import FritzConnection
fc = FritzConnection(address="192.168.178.1", user="user", password="pw")
fc.call_action("WANIPConn1", "ForceTermination")
Requires network access to a FRITZ!Box router; credentials (username/password) can be read from FRITZ_USERNAME and FRITZ_PASSWORD environment variables to avoid hardcoding.
Verify before relying
- Whether the optional segno dependency (for QR-code generation) is needed for your use case
- Performance characteristics when managing many home automation devices simultaneously
- Compatibility with specific FRITZ!Box models or firmware versions beyond the documented API
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | actively maintained — 200 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 136,580/month — #11,392 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fritzconnection-1.15.1-py3-none-any.whl
Keywords: AVM, FRITZ!Box, fritzbox, fritz, TR-064, AHA-HTTP, homeautomation
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pyfritzhomeProvides Python access to AVM Fritz!Box home…
permissive · top 15,000 on PyPI
sfrbox-apiProvides an async Python client for interacting…
permissive · top 15,000 on PyPI
asusrouterAsynchronous API wrapper for querying and…
permissive · top 15,000 on PyPI
pynetgearpyNetgear provides a Python API to communicate…
permissive · top 15,000 on PyPI
python-otbr-apiProvides a Python client to interact with an…
permissive · top 15,000 on PyPI
python-miioPython library and CLI tool for controlling…
copyleft · top 15,000 on PyPI
pyvesyncAsynchronous Python library to discover,…
permissive · top 15,000 on PyPI
tinytuyaControls and monitors Tuya WiFi smart devices…
permissive · top 15,000 on PyPI
velbus-aioAn asyncio-based Python library for controlling…
permissive · top 15,000 on PyPI
HATasmotaParses and constructs Tasmota MQTT messages,…
permissive · top 15,000 on PyPI