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.2.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: TSIClient-2.1.2.tar.gz
  • Upload date:
  • Size: 17.8 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.2.tar.gz
Algorithm Hash digest
SHA256 63d1c686d1fb0018d778471cf145182bdce2820135b0eba0a3175b1da4ba2db8
MD5 2510bcc3c28d839739aa4d582c78d100
BLAKE2b-256 39581b59e29e11ab319671a459c9bbc2ad00c72b292a6560f204cd3f6b9dfa21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: TSIClient-2.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62f73afa7647dec020c59e78d9269dafa03426824211f2a27da5e9af114182de
MD5 3d9008c5579da88915b55c47a8747906
BLAKE2b-256 d7c8cf75e935be2a519ebb4bf1e472398a09e4d7ea88317192596be642dbc104

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