Metadata-Version: 2.4
Name: pytonika
Version: 0.2.0
Summary: Python wrapper for the Teltonika API.
Author-email: Iker García Calviño <iker.gcalvino@udc.es>
License: MIT License
        
        Copyright (c) 2025 Iker García Calviño
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/ikergcalvino/pytonika
Project-URL: Repository, https://github.com/ikergcalvino/pytonika.git
Project-URL: Issues, https://github.com/ikergcalvino/pytonika/issues
Keywords: teltonika,api,python,networking,routers,gateways,access-points,switches
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Networking
Classifier: Topic :: Communications
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.28.1
Dynamic: license-file

# Pytonika

Pytonika is a lightweight Python client library to interact with **Teltonika Networks devices** via their Web API.
It provides simple device abstractions and grouped endpoint interfaces to make automation and scripting straightforward.

- Lightweight, synchronous HTTP client built on top of [httpx](https://www.python-httpx.org/).
- Device wrappers for routers, gateways, access points and switches.

> [!IMPORTANT]
> Pytonika is **not an official Teltonika library**.
> This project is maintained by the community and is not affiliated with or endorsed by Teltonika Networks.

## Installation

### Requirements

- Python **3.10+**
- [httpx](https://pypi.org/project/httpx/) >= **0.28.1**

### Install from PyPI

```bash
pip install pytonika
```

### Basic usage

```python
>>> from pytonika import Router
>>> router = Router("http://192.168.1.1/")
>>> router.authentication.login("admin", "admin01")
{'success': 'boolean', 'data': {'username': 'string', 'group': 'string', 'token': 'string', 'expires': 'integer'}}
>>> router.authentication.get_session_status()
{'success': 'boolean', 'data': {'active': 'boolean'}}
>>> router.authentication.logout()
{'success': 'boolean', 'data': {'response': 'string'}}
```

## Contribute

If you want to contribute with Pytonika check out the [Contributing guidelines](CONTRIBUTING.md).

## License

[MIT License](LICENSE)
