Structured way to interface with Telstra Track and Monitor
Project description
TelstraTrackMonitorAPI
Intended to be a Structured way to interface with Telstra's Track & Monitor API.\
It mostly focuses on devices for now.
Has classes and methods for:
- Token Management - Get/Load/save/update
- Getting Devices with specified params
Usage
Firstly you need to make up an instance of the TokenManager Class.
This Class will be used to pass the retrieved Token to other methods later
ttm_token = TelstraTrackMonitorAPI.TokenManager(
server='https://tapi.telstra.com'
client_id='XXXXXXXXXXXXXXXXXXXXX'
client_secret='XXXXXXXXXXXXXXXXXXXXX'
save_location='ttm_token.json'
)
ttm_token.load_token() #Loads any token information in the save_location json file
ttm_token.update_token() # Check if the token is expired and renews if so.
Once the above is done we can actually pull some information from Track & Monitor API
with TelstraTrackMonitorAPI.Sessions(ttm_token.server,ttm_token.access_token) as TTM:
ttm_devices=TTM.devices_get(
{'$filter':'not(deviceFriendlyName eq null)'}
)
The above method will get all devices in Track & Monitor API that have a Device Friendly name.
Installation
pip install TelstraTrackMonitorAPI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file TelstraTrackMonitorAPI-0.1.8.tar.gz.
File metadata
- Download URL: TelstraTrackMonitorAPI-0.1.8.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b06569ffa0645d35637db585ef2cb16dbb65c5ce1bfeb0ce58dcc73199f563e0
|
|
| MD5 |
d0be3c2d8dfac21789b181a8f346718a
|
|
| BLAKE2b-256 |
1bbdcc5059df9d85b2f75a9a14fb068754109df2115e8c4818e9877dfd642d25
|
File details
Details for the file TelstraTrackMonitorAPI-0.1.8-py3-none-any.whl.
File metadata
- Download URL: TelstraTrackMonitorAPI-0.1.8-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d67c52d971a3eb555759dbd3e0e83c5f6f1c04f6853601568b6d871908014968
|
|
| MD5 |
7cba8df4e13ab851d62238ebbc210973
|
|
| BLAKE2b-256 |
2f2b75d0e0fb7cbed2062d459f9133442ad6726c6ca60865cbc2813867d059b0
|