(Unofficial) Python wrapper to interact with SagemCom F@st routers via internal API's.
Repo iMicknl/python-sagemcom-api, read from GitHub 22 h ago. iMicknl has not joined Take My Repo.
This release fixes setup on routers whose firmware lacks optional device fields (e.g. TalkTalk F@ST 5364), prevents repeated reboots/speed tests after a dropped connection, stops login probing from extending a router's login lock, and recovers from expired sessions instead of reporting an authentication failure. It also adds experimental support for newer firmware that only exposes the /api/v1 REST API.
No public API was removed (new arguments are optional and keyword-compatible), but some calls now raise a specific exception where they previously returned None or crashed:
XMO_INVALID_SESSION_ERR now raises InvalidSessionException (no longer a subclass of UnauthorizedException); the client logs in again and retries once before raising.get_encryption_method() raises LoginRetryErrorException when the router has locked logins (#556), instead of trying the remaining methods and returning None.reboot() and run_speed_test() are not resent after a dropped connection (#555). If the router drops the connection after receiving the request (as it does when rebooting), a ConnectionError is raised instead of sending it up to 5 times.None values. get_device_info() raises UnknownPathException if the MAC address is unavailable.api_mode argument (ApiMode.AUTO default, LEGACY, REST). AUTO tries the legacy API first and only falls back to /api/v1 when legacy is unavailable; REST covers login, logout, device info, hosts and reboot. Not yet verified on REST hardware. When passing your own session for REST, it needs CookieJar(unsafe=True).ModelNumber) are None when the firmware does not provide them; new ignore_unknown_paths argument for get_value_by_xpath() / get_values_by_xpaths(). Both XMO_INVALID_PATH_ERR and XMO_UNKNOWN_PATH_ERR raise UnknownPathException (#386) @mr-miles@arpena, @espipj, @iMicknl, @manueltarouca, @mr-miles, @dependabot[bot] and @claude
@bakonyiferenc, @fraviktor, @iMicknl, @sydragos, @WASDi, @dependabot[bot] and @Copilot
@dependabot[bot] and dependabot[bot]
@dependabot[bot], @rhegner and dependabot[bot]
@dependabot, @dependabot[bot] and @mgyucht
@bunnis, @dependabot and @dependabot[bot]