Skip to main content

A small example package

Project description

This python package is unofficial and is not related in any way to Telekom. It was developed by reversed engineered http requests and can stop working at anytime!

Speedport-API

Control Telekom Speedport routers with Python!

Installation

pip install speedport-api

Supported Devices

  • Speedport Smart 4

Commandline tool

With this shipped commandline tool can a speedport in your network be controlled.

Turn wifi off

$ speedport wifi off
Turn off wifi...

Turn guest wifi on

$ speedport guest-wifi on
Turn on guest wifi...

Reconnect for new ip address

$ speedport reconnect
123.45.67.89 / 5403:f3:35aa:12f:7287:41cf:fb1c:3c83
Reconnect with internet provider...
123.45.67.12 / 5403:f3:35fe:12f:7287:41cf:fb1c:3c83

Enable wps connect

$ speedport wps
Enable wps connect...
wps connect enabled for 113s...

Reboot device

$ speedport reboot
Reboot speedport...

Print devices

$ speedport devices
+-------------+---------------------+-------+-----------+
| ipv4        | name                | type  | connected |
+-------------+---------------------+-------+-----------+
| 10.5.12.32  | Google-Home-Mini-1  | wlan  | 1         |
| 10.5.12.157 | PC10-5-12-157       | lan   | 0         |
| 10.5.12.227 | andre-xps           | wlan5 | 1         |

Print calls

$ speedport calls
+-------------+--------+----------+---------------------+
| number      | type   | duration | date                |
+-------------+--------+----------+---------------------+
| 01578212345 | missed | 0        | 2024-04-04 09:34:35 |
| 026361245   | taken  | 1337     | 2024-04-06 05:12:53 |
| 7866        | dialed | 20       | 2024-04-06 18:39:00 |

Print PortForwardings

$ speedport port-forwardings
+----+-------+--------+
| id | name  | active |
+----+-------+--------+
| 1  | https | False   |
| 2  | wg    | True   |
+----+-------+--------+

Enable/Disable PortForwardings

$ speedport pfw <id> <active>
INFO - Turn on/off port forwarding id=1...

Library

Reconnect example

import asyncio
from speedport import Speedport

async def reconnect():
    speedport =  Speedport("192.168.1.1")
    await speedport.login("password123")
    await speedport.reconnect()

asyncio.run(reconnect())

Devices example

import asyncio
from speedport import Speedport

devices = asyncio.run(Speedport().devices)
for device in devices:
    print(device.ipv4, device.connected)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

speedport_api_v2-0.7.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

speedport_api_v2-0.7.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file speedport_api_v2-0.7.0.tar.gz.

File metadata

  • Download URL: speedport_api_v2-0.7.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for speedport_api_v2-0.7.0.tar.gz
Algorithm Hash digest
SHA256 e78d84ddec7465b02aa77198bc2623cbc1a2bed2fef75b1d9936b3d70f8e1c12
MD5 c61389707607beaaf32a13153c3b7082
BLAKE2b-256 24e9867cf31f0a6e5c075e20e7b638db69da632ab2fa2ab06de65b202f9b7086

See more details on using hashes here.

File details

Details for the file speedport_api_v2-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for speedport_api_v2-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63fb7316a5eebb41266373d9507f5ef4ec19c654b9a0d1807da5820f041fc86c
MD5 9709586f51023f9789f031b85a9daa96
BLAKE2b-256 98c507ae0aa68081e5b684a744aa4ed8b9e7948bacccfcf373ec8ebd87c06fe3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page