Query and Ingestion Client for Azure using Python
Project description
Getting started
Installation and Import
pip install kustopy
from kustopy import KustoPyClient as kpc
QueryClient
# Get login credential from Azure Vault
client_id = dbutils.secrets.get(scope="ce5", key="adxClientId")
client_secret = dbutils.secrets.get(scope="ce5", key="adxClientSecret")
tenant_id = dbutils.secrets.get(scope="ce5", key="adxTenantId")
# Set up the query client
query_client = kpc.QueryClient(cluster='https://sample.kusto.windows.net/',
database='confidential-satanalytics-sample',
client_id=client_id,
client_secret=client_secret,
tenant_id=tenant_id,
truncation=False)
# Query all tables available in database
query_client.get_table_names()
# Write kusto queries to get data into pandas dataframe
query_client.query_to_df('SampleTable | take 100 | where fruit=="apple"')
IngestionClient
# Get login credential from Azure Vault
client_id = dbutils.secrets.get(scope="ce5", key="adxClientId")
client_secret = dbutils.secrets.get(scope="ce5", key="adxClientSecret")
tenant_id = dbutils.secrets.get(scope="ce5", key="adxTenantId")
# Set up the ingestion client
query_client = kpc.IngestionClient(cluster='https://sample.kusto.windows.net/',
database='confidential-satanalytics-sample',
client_id=client_id,
client_secret=client_secret,
tenant_id=tenant_id,
truncation=False)
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
kustopy-1.0.21.tar.gz
(3.9 kB
view details)
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 kustopy-1.0.21.tar.gz.
File metadata
- Download URL: kustopy-1.0.21.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ea5fb484183235f856166509b17d536e61dabbd6193ef05f3946c0594e629f
|
|
| MD5 |
66daaf905a6313c841ecf3a3db0bf992
|
|
| BLAKE2b-256 |
638c61d70020426ff7a9bfa887dd1985270316592cdc69b698c12910f8d3da0e
|
File details
Details for the file kustopy-1.0.21-py3-none-any.whl.
File metadata
- Download URL: kustopy-1.0.21-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55d11923068a7adf04173c730125a9a41ff8b4c0f36cc329df263c321291d36c
|
|
| MD5 |
924aa47b7c250d3261fa2eefb813795a
|
|
| BLAKE2b-256 |
a67b3ac1fbe81e446fd005a788e789217cd996c2d633ac489a47ba353e2e9446
|