Registry / devops / tplinkrouterc6u

tplinkrouterc6u

JSON →
library5.22.1pypypi✓ verified 85d ago

Python wrapper for TP-Link and Mercusys router management API. Supports Archer, Deco, and other models with firmware-based endpoints. Version 5.22.1 requires Python >= 3.10.

pip install tplinkrouterc6u
INSTALL
IMPORT
SIG · TPLINKROUTERC6U
T
tplinkrouterc6u
devopspythonv5.22.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TplinkRouter
from tplinkrouterc6u import TplinkRouter
from tplinkrouterc6u.tplinkrouterc6u import TplinkRouter
Correct top-level import path
Router
from tplinkrouterc6u import Router
from tplinkrouterc6u.router import Router
Use top-level import for Router class
exceptions
from tplinkrouterc6u import exceptions
from tplinkrouterc6u.exception import ...
Module is named 'exceptions', not 'exception'

Simple authentication and data retrieval. Replace host, username, password with your router credentials.

import os from tplinkrouterc6u import TplinkRouter router = TplinkRouter( host=os.environ.get('ROUTER_HOST', '192.168.0.1'), username=os.environ.get('ROUTER_USERNAME', 'admin'), password=os.environ.get('ROUTER_PASSWORD', ''), ) print(router.get_firmware()) print(router.get_status())
Debug
Known issues
breakingIn version 5.x, the library switched from async to sync by default. If you were using async, update your code or use the async submodule.
fix
Use synchronous methods directly or import from tplinkrouterc6u.async if async is required.
affects: 4.x -> 5.x
deprecatedThe parameter `timeout` in Router constructor is deprecated in favor of `timeout_seconds`.
fix
Replace `timeout=10` with `timeout_seconds=10`.
affects: >=5.0.0
gotchaThe library only supports routers with firmware exposing the native TP-Link API (typically old firmware). Newer firmware may not work.
fix
Verify router compatibility before use. Check the GitHub README for supported models.
affects: all
gotchaPasswords with special characters like `%` can break URL parsing if not URL-encoded.
fix
Use `requests.utils.quote(password, safe='')` to encode password before passing.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tplinkrouterc6u'
Package not installed or imported incorrectly.
fix
Run `pip install tplinkrouterc6u` and use correct import: `from tplinkrouterc6u import TplinkRouter`.
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.0.1', port=80): Max retries exceeded
Router not reachable at given host/port or blocked by firewall.
fix
Verify router IP and port (default 80). Ensure you are on the same network and router accepts HTTP connections.
tplinkrouterc6u.exceptions.AuthorizationException: 401
Incorrect username or password.
fix
Double-check credentials. Some routers require admin/admin as default.
ValueError: Invalid firmware version
Router firmware is not compatible with the library.
fix
Update router firmware or use the async client: `from tplinkrouterc6u.async import TplinkRouter`.
Upgrade
Version history
5.22.1latest on PyPI · released Jun 5, 2026
Audit
Dependencies
socksiooptionalOptional proxy support
Agent activity
38 hits · last 30 days
node
32
OpenAI (training)
1
Resources
tplinkrouterc6u — pip install tplinkrouterc6u · libregistry