Skip to content

Library

InternetBoxClient logs in to the router and groups its functions by area, e.g. ibox.wifi or ibox.firewall. Each page in this section is one group, with every method's description: what it does, its arguments, and what the router does with them.

from internetbox_client import InternetBoxClient

with InternetBoxClient(hostname="192.168.1.1", password="secret") as ibox:
    print(ibox.wifi.summary())

InternetBoxClient takes hostname, password, username and ssl_verify. The ones you leave out come from the environment variables. It logs in on the first call that needs the password, and logs out at the end of the with block, or when you call close().

Methods return the router's answer as text, usually JSON: json.loads() turns it into Python objects.

Every method is also a CLI command: ibox.wifi.set_guest_enabled() is ibox wifi set-guest-enabled, and ibox wifi set-guest-enabled --help shows its options.

Helpers

For tools built on the library, such as the MCP server. The library and the CLI show passwords and keys.

internetbox_client.utils.labels.action

action(method: Callable[..., object]) -> Action

What a method does to the router: "read", "write" or "disruptive". Works on bound methods too.

internetbox_client.utils.helpers.hide_secrets

hide_secrets(data: Any) -> Any

Return a copy of a decoded response with passwords, keys and other secrets replaced by "<hidden>".

Secrets are recognised by their key, e.g. KeyPassPhrase (Wi-Fi), password (DynDNS) or PreSharedKey (WireGuard). Empty values stay, so it's still visible that none is set, and so do booleans such as UseSyncToken. A method whose whole result is a secret, e.g. dect.pin(), is labelled instead: see labels.has_secret_result().

The library and the CLI show secrets. This is for output that shouldn't, e.g. an MCP server's.