Files
napalm-fritzbox/README.md
T
Christian Manivong e352801a1a
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 55s
driver / test (3.10) (pull_request) Successful in 5m52s
driver / test (3.11) (pull_request) Successful in 5m58s
driver / test (3.12) (pull_request) Successful in 5m49s
driver / test (3.13) (pull_request) Successful in 5m32s
driver / lowest (pull_request) Successful in 5m19s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 31m5s
driver / publish (pull_request) Skipped
chore: adopt the NAPALM driver standard
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard; .github/ is gone.
- napalm-device-types >=4.21.1 from PyPI (the floor was 0.4.0).
- LICENSE, CHANGELOG, py.typed, SPDX license string, setuptools>=77,
  version floors on the dev extra (black is gone), links to git.netork.io;
  the README names Python 3.10 and the Gitea CI.
- mypy strict for the package; napalm_fritzbox.fritzbox is exempt for now
  (6 errors), recorded in the quality baseline with four long getters.
- Coverage floor 81 % (measured 81.36 %).
2026-10-23 09:00:49 +02:00

96 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# napalm-fritzbox
NAPALM community driver for **AVM FritzBox** routers (read-only, via TR-064).
## Requirements
| Dependency | Minimum version |
|---|---|
| Python | 3.10 |
| NAPALM | 4.0 |
| napalm-device-types | 4.21.1 |
| fritzconnection | 1.13 |
## Installation
```bash
pip install napalm-fritzbox
```
Or from source:
```bash
git clone https://git.netork.io/NAPALM/napalm-fritzbox
cd napalm-fritzbox
pip install -e .
```
## Quick start
```python
from napalm import get_network_driver
driver = get_network_driver("fritzbox")
with driver(
"192.168.178.1",
"user",
"pass",
optional_args={"use_tls": True},
) as d:
print(d.get_facts())
print(d.get_wan_status())
print(d.get_hosts())
```
### Example
```python
driver = get_network_driver("fritzbox")
d = driver("fritz.box", "user", "pass")
d.open()
print(d.get_wan_status())
print(d.get_port_forwards())
print(d.get_ssids())
print(d.get_wireless_clients())
d.close()
```
## Optional arguments
| Argument | Default | Description |
|---|---|---|
| `use_tls` | `True` | Use HTTPS (port 49443) instead of HTTP (port 49000) |
| `port` | `49443` / `49000` | Override the TR-064 port |
FritzBox serves TR-064 over HTTPS with a self-signed certificate; `fritzconnection`
does not verify it, so no separate `verify` option is needed.
## Limitations
- Read-only: configuration management methods (`load_merge_candidate`,
`commit_config`, ...) are not implemented.
- `get_nat_translations()` is derived from the enabled port-forwarding rules —
TR-064 does not expose a live connection-tracking table.
- `get_vpn_tunnels()` returns an empty dict — FritzOS does not expose VPN
tunnel status via TR-064.
- `channel_width`, `tx_power` and `frequency` in `get_radio_status()` are not
available via TR-064 and are reported as `0`.
## Development
The rules are in [STANDARDS.md](https://git.netork.io/NAPALM/driver-standard/src/branch/main/STANDARDS.md).
```bash
python -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/pytest --cov
```
CI ([.gitea/workflows/ci.yml](.gitea/workflows/ci.yml)) calls the shared workflow of
the NAPALM driver standard: ruff, mypy, the tests on Python 3.10–3.13, bandit,
pip-audit and a build check.
## License
Apache 2.0 — see [LICENSE](LICENSE).