https://github.com/bencevans/ponika
Python library for interacting with the Teltonika devices.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.7%) to scientific vocabulary
Repository
Python library for interacting with the Teltonika devices.
Basic Info
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
Ponika
Ponika is a Python library for interacting with the Teltonika devices.
Installation
You can install Ponika using pip:
bash
pip install ponika
Usage
To use Ponika, you need to create an instance of PonikaClient with the appropriate parameters. Here's a basic example:
```python from ponika import PonikaClient
client = PonikaClient( host="192.168.1.1", username="yourusername", password="yourpassword", # port=80, # Optional, default is 443 if tls=True else 80 # tls=False, # Optional, default is True # verify_tls=False, # Optional, default is True ) ```
The library follows the structure of the Teltonika API endpoints. For example, to get the internet status from the endpoint /api/v1/internet_connection/status, you can do the following:
```python response = client.internetconnection.getstatus()
if response.success and response.data: print("Internet Status:") print("IPv4:", response.data.ipv4status) print("IPv6:", response.data.ipv6status) print("DNS: ", response.data.dns_status) else: print("Error:", response.errors) ```
[!NOTE] Not all endpoints are implemented. If you need a specific endpoint that's missing, the existing endpoints should be a good reference for how to implement new ones.
Examples
Get Internet Status
```python response = client.internetconnection.getstatus()
if response.success and response.data: print("Internet Status:") print("IPv4:", response.data.ipv4status) print("IPv6:", response.data.ipv6status) print("DNS: ", response.data.dns_status) else: print("Error:", response.errors) ```
Get GPS Position
```python response = client.gps.position.get_status()
if response.success and response.data: print("GPS Position:") print("Latitude:", response.data.latitude) print("Longitude:", response.data.longitude) print("Altitude:", response.data.altitude) else: print("Error:", response.errors) ```
Contributing
If you want to contribute to Ponika, feel free to open a pull request on the GitHub repository. Contributions are welcome!
The project is setup to use uv for development and requires prior installation. Once you've cloned the repository, you can set up the development environment by running:
bash
uv sync
To run the tests, you can use the following command, updating the environment variables as needed:
```bash
Required variables
---------------------
export TELTONIKAHOST=192.168.1.1 export TELTONIKAUSERNAME=admin export TELTONIKA_PASSWORD=password
Optional variables
---------------------
Enables SMS sending tests
export MOBILE_NUMBER=441234567890
Run the tests
uv run pytest ```
Owner
- Name: Ben Evans
- Login: bencevans
- Kind: user
- Location: London, UK
- Company: Institute of Zoology, ZSL
- Website: https://bencevans.io/
- Twitter: bencevans
- Repositories: 282
- Profile: https://github.com/bencevans
GitHub Events
Total
- Release event: 1
- Push event: 1
- Public event: 1
- Create event: 3
Last Year
- Release event: 1
- Push event: 1
- Public event: 1
- Create event: 3
Dependencies
- pydantic >=2.11.5
- requests >=2.32.3
- annotated-types 0.7.0
- certifi 2025.4.26
- charset-normalizer 3.4.2
- colorama 0.4.6
- idna 3.10
- iniconfig 2.1.0
- packaging 25.0
- pluggy 1.6.0
- ponika 0.4.0
- pydantic 2.11.5
- pydantic-core 2.33.2
- pygments 2.19.1
- pytest 8.4.0
- requests 2.32.3
- ruff 0.11.13
- typing-extensions 4.14.0
- typing-inspection 0.4.1
- urllib3 2.4.0