skillfed

fritzconnection

Communicate with the AVM FRITZ!Box

fritzconnection v1.15.1 136.6K downloads/30d#11,392 on PyPI396
Permissive license MIT Active released

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 fritzconnection

uv

uv add fritzconnection

poetry

poetry add fritzconnection

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

fritz box router controlTR-064 protocol pythonhome automation device managementfritz box api clientAVM router automationcall monitoring fritz boxsmart home device control
home-automationrouter-managementdevice-control

More Python Modules packages