teltasync 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: teltasync
3
+ Version: 0.1.1
4
+ Summary: Async, typed API client for Teltonika routers, built for Home Assistant
5
+ Author: Karl Beecken
6
+ Author-email: karl@beecken.berlin
7
+ Requires-Python: >=3.13
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.13
10
+ Classifier: Programming Language :: Python :: 3.14
11
+ Requires-Dist: aiohttp (>=3.12,<4.0)
12
+ Requires-Dist: pydantic (>=2.7,<3.0)
13
+ Description-Content-Type: text/markdown
14
+
15
+ # teltasync
16
+
17
+ teltasync is an async python library for interfacing with Teltonika routers via their HTTP API.
18
+
19
+ ## Installation
20
+
21
+ You can install the library using pip:
22
+
23
+ ```bash
24
+ pip install teltasync
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ This is a simple example of how to use the library:
30
+
31
+ ```python
32
+ import asyncio
33
+
34
+ from teltasync import Teltasync
35
+
36
+
37
+ async def main():
38
+ # Create client
39
+ client = Teltasync(
40
+ base_url="https://192.168.1.1/api", # Full API URL
41
+ username="admin", # Admin username
42
+ password="YOUR_PASSWORD", # Admin password
43
+ verify_ssl=False # Most Teltonika devices use self-signed certs
44
+ )
45
+
46
+ try:
47
+ # Get basic device info (no authentication required)
48
+ device_info = await client.get_device_info()
49
+ print(f"Device: {device_info.device_name} ({device_info.device_model})")
50
+
51
+ # Validate credentials
52
+ if await client.validate_credentials():
53
+ print("Credentials are valid!")
54
+
55
+ # Get detailed system information
56
+ system_info = await client.get_system_info()
57
+ print(f"Firmware version: {system_info.static.fw_version}")
58
+
59
+ # Get modem status
60
+ modems = await client.get_modem_status()
61
+ for modem in modems:
62
+ print(f"Modem {modem.id}: {modem.operator} ({modem.conntype})")
63
+ print(f" Signal: {modem.rssi} dBm")
64
+
65
+ else:
66
+ print("Invalid credentials!")
67
+
68
+ finally:
69
+ # Always close the session
70
+ await client.close()
71
+
72
+
73
+ # Using as async context manager (recommended)
74
+ async def context_manager_example():
75
+ async with Teltasync(
76
+ base_url="https://192.168.1.1/api",
77
+ username="admin",
78
+ password="YOUR_PASSWORD",
79
+ verify_ssl=False
80
+ ) as client:
81
+ device_info = await client.get_device_info()
82
+ print(f"Device: {device_info.device_name}")
83
+ # Session automatically closed when exiting context
84
+
85
+
86
+ # Run the example
87
+ if __name__ == "__main__":
88
+ asyncio.run(main())
89
+ ```
90
+
91
+ ## Supported Devices
92
+
93
+ Although it was currently only tested against a RUTX50, this library should work with most Teltonika routers that
94
+ support the [HTTP API](https://developers.teltonika-networks.com/), including:
95
+
96
+ - RUT series (RUT240, RUT241, RUT950, RUT955, etc.)
97
+ - RUTX series (RUTX09, RUTX11, RUTX12, etc.)
98
+ - TRB series gateways
99
+ - Other Teltonika devices with HTTP API support
100
+
101
+ ## Requirements
102
+
103
+ - Python 3.13+
104
+ - aiohttp
105
+ - pydantic
106
+
@@ -9,6 +9,6 @@ teltasync/system.py,sha256=dWG8O0-iT7AvdEq4acn9rDv-BOhFduXTP7MY14qrFZc,9336
9
9
  teltasync/teltasync.py,sha256=g57eWpIq5qwP8Rm0e9_5ZaGolNdUCSsdTNwFfkyAfCU,4513
10
10
  teltasync/unauthorized.py,sha256=XTNVonLh8SGtTbENCqv_PV06mbhMx5kdvoKp8EkuW5k,1808
11
11
  teltasync/utils.py,sha256=TWPDgRq9i5idJJ12o_qWDOaC6RVpK2B3U73wRc6jpkg,149
12
- teltasync-0.1.0.dist-info/METADATA,sha256=3AyhObooAC1lvTTzpcoQag_y1cKmEIOCY4fXPZ4kO-c,437
13
- teltasync-0.1.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
14
- teltasync-0.1.0.dist-info/RECORD,,
12
+ teltasync-0.1.1.dist-info/METADATA,sha256=06Vgu-FTr1-NMY6xUyYTkYsaoGD8lSHNvSrVP6EOWx0,2944
13
+ teltasync-0.1.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
14
+ teltasync-0.1.1.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: teltasync
3
- Version: 0.1.0
4
- Summary: Async, typed API client for Teltonika routers, built for Home Assistant
5
- Author: Karl Beecken
6
- Author-email: karl@beecken.berlin
7
- Requires-Python: >=3.13
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.13
10
- Classifier: Programming Language :: Python :: 3.14
11
- Requires-Dist: aiohttp (>=3.12,<4.0)
12
- Requires-Dist: pydantic (>=2.7,<3.0)