Skip to main content

The TSIClient is a Python SDK for Microsoft Azure time series insights.

Project description

Raa Labs

TSIClient

build Documentation Status Coverage Maintainability Rating PyPI version Downloads

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.

:warning: Azure Time Series Insights will be deprecated on 31.3.2025. Read the anncouncment from Microsoft here: https://azure.microsoft.com/en-us/updates/we-ll-retire-azure-time-series-insights-on-31-of-march-2025/.

The TSIClient will not be developed further by Raa Labs.

Documentation

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TSIClient-raalabs-2.1.3.tar.gz (17.9 kB view details)

Uploaded Source

File details

Details for the file TSIClient-raalabs-2.1.3.tar.gz.

File metadata

  • Download URL: TSIClient-raalabs-2.1.3.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for TSIClient-raalabs-2.1.3.tar.gz
Algorithm Hash digest
SHA256 41a7281c87abefb7cf25fa80106f675c976215088c0d2f9fd967d76b4b2dd99c
MD5 39bb5d5f05e88a32124a098328076e26
BLAKE2b-256 636f0850bba8d847a6ecddf99a9a466d7ec8f84d7165f8a4a769d2e7983a3ef6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page