This project has been archived by its maintainers, and is no longer receiving any updates.
TSIClient
The TSIClient is a Python SDK for Microsoft Azure time series insights. It provides methods to conveniently retrieve your data and is designed for analysts, data scientists and developers working with time series data in Azure TSI.
Documentation
- Azure time series REST APIs: https://docs.microsoft.com/en-us/rest/api/time-series-insights/
- TSIClient: https://raalabs-tsiclient.readthedocs.io/en/latest/
Installation
We recommended to use a Python version >= 3.6. You can install the TSIClient from PyPi:
pip install TSIClient
Or if you want to get the latest code, directly fom GitHub:
pip install git+https://github.com/RaaLabs/TSIClient.git
Quickstart
Instantiate the TSIClient to query your TSI environment. Log in to Azure using the Azure CLI:
az login --tenant <your-azure-tenant-id>
Now instantiate the client like this:
from TSIClient import TSIClient as tsi
client = tsi.TSIClient(
environment="<your-tsi-env-name>",
applicationName="<your-app-name>"
)
You can check the docs at https://raalabs-tsiclient.readthedocs.io/en/latest/authentication.html for more information on authentication, and check the old way of authentication (these will be removed in a future version).
You can query your timeseries data by timeseries id, timeseries name or timeseries description. The Microsoft TSI apis support aggregation, so you can specify a sampling freqency and aggregation methods. Refer to the documentation for detailed information.
data = client.query.getDataById(
timeseries=["timeseries_id1", "timeseries_id2"],
timespan=["2019-12-12T15:35:11.68Z", "2019-12-12T17:02:05.958Z"],
interval="PT5M",
aggregateList=["avg", "max"],
useWarmStore=False
)
This returns a pandas dataframe, which can be used for analysis.
Contributing
Contributions are welcome. See the developer reference for details.
License
TSIClient is licensed under the MIT license. See LICENSE file for details.
Metadata
Release files for TSIClient 2.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| TSIClient-2.1.3.tar.gz | 18.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| TSIClient-2.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.2 kB
Release files / TSIClient-2.1.3.tar.gz
| Download URL | TSIClient-2.1.3.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1419cf1fe7b1177e8d387bfafde099adda1ac0242a2e66ea607102948500aee9
|
|
BLAKE2b-256 checksum How to use checksums |
5538d5bf8b797edafa3f31f23126a09d8a906737d2762a82263fd26c1a9007c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / TSIClient-2.1.3-py3-none-any.whl
| Download URL | TSIClient-2.1.3-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0bc289129b352c2023cbb454fbad1495299a08fae502ed16d8aa72774879452a
|
|
BLAKE2b-256 checksum How to use checksums |
1f7d33121ebb2cd57e958d07be5357ceb1af4cddf150203745ef0f7367714923
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|