Skip to main content

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

Project description

TSIClient

build codecov Documentation Status 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.

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(
    enviroment="<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 an aggregation method. 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",
    aggregate="avg",
    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-2.1.1.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

TSIClient-2.1.1-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file TSIClient-2.1.1.tar.gz.

File metadata

  • Download URL: TSIClient-2.1.1.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for TSIClient-2.1.1.tar.gz
Algorithm Hash digest
SHA256 ef144f97652e6f8dd778df786504e6642f96c1f2e0d4ff336a2e392a4946d7ec
MD5 44c53c740964cb69607409e96be23b12
BLAKE2b-256 4ba8bb66cabcc2086590e414f1dfdeaccc5fc5fe6f28198fcf7e2b17c8613a52

See more details on using hashes here.

File details

Details for the file TSIClient-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: TSIClient-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for TSIClient-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e0c0e7f2b9324d03c605549e7fd18c57f8f0ee81b628173eb9c22813b96571e
MD5 ee3a4a52aaec9c93de228267345ae85e
BLAKE2b-256 cfa4db6aaee5b82b09fdbb9b40029c8023895bbe868434f3bb7f461201187140

See more details on using hashes here.

Supported by

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