pyinternetbox
Your Swisscom Internet Box - with batteries included.
Python library | CLI | MCP server | Prometheus exporters | Grafana dashboards
pyinternetbox talks to the Swisscom Internet Box the way its web interface does. Read its status and change its settings from Python or the ibox command line, collect its metrics with Prometheus, or let an AI app look after it. It's tested on the Internet Box 4: see Supported models.
🚀 Installation
pip install pyinternetbox # library + `ibox` CLI
pip install "pyinternetbox[mcp]" # also the MCP server, `ibox mcp`
uv tool install pyinternetbox # or: just the `ibox` CLI, in its own environment
Most functions need the router's admin password. Give it, and the router's address if it isn't internetbox.swisscom.ch, as environment variables:
export IB_HOSTNAME=192.168.1.1
export IB_PASSWORD=secret
⚡ Quick start
CLI: every library function is a command, and the output is JSON, ready for jq.
ibox devices summary
ibox wifi summary
ibox firewall set-port-forwarding minecraft 192.168.1.20 25565 --protocol tcp
Library:
from internetbox_client import InternetBoxClient
with InternetBoxClient() as ibox:
print(ibox.devices.summary())
Prometheus exporter, with Docker. The metrics are at http://localhost:9101/metrics.
docker run -d -p 9101:9101 -e IB_PASSWORD=secret oregonpillow/pyinternetbox:latest
MCP server, for AI apps such as OpenCode or Claude Desktop. The app starts it with uvx --from "pyinternetbox[mcp]" ibox mcp, and it's read-only unless you allow changes.
📚 Documentation
- Getting started: installation, the CLI and the library
- Exporter: running it, the metrics and the Grafana dashboards
- MCP server: setup, and what the AI may do
- Library reference: every method
- Contributing: development, tests and releasing. Contributions are welcome!
- Changelog
Related Projects
Disclaimer
While I work at Swisscom, this project is a personal endeavor and is not affiliated with or endorsed by Swisscom. The information provided in this project is based on my own research and experience from observing the REST-API calls the router makes when you login using developer tools in your browser. Use at your own risk. I don't work with the Internet Box team or have any affiliation with them.
Metadata
Release files for pyinternetbox 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyinternetbox-0.3.2.tar.gz | 159.2 kB | With provenance | Details for pyinternetbox-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyinternetbox-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for pyinternetbox-0.3.2-py3-none-any.whl |
Total release size: 268.1 kB
Release files / pyinternetbox-0.3.2.tar.gz
| Download URL | pyinternetbox-0.3.2.tar.gz |
|---|---|
| Size | 159.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf2f44bbc950292dce3cb9f5c5335d5c638db9a4f3a8035df3dcf3d734dea7ad
|
|
BLAKE2b-256 checksum How to use checksums |
4d65f4f0d95795924f064d4d015137225fc089d9fa8366cab7375c08838c5275
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logRelease files / pyinternetbox-0.3.2-py3-none-any.whl
| Download URL | pyinternetbox-0.3.2-py3-none-any.whl |
|---|---|
| Size | 108.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e88b4a1f0ef8353af3c175d87283d6e875204e3d701c3871d6f85d77406a85ee
|
|
BLAKE2b-256 checksum How to use checksums |
ddb749996c2430c992b23ab17dda62bb74e4e9abd0b2580e535b6caff4a87196
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logSecurity for pyinternetbox 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyinternetbox-0.3.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.