Metadata-Version: 2.1
Name: kustopy
Version: 1.0.19
Summary: Query and Ingestion Client for Azure using Python
Home-page: https://github.com/tillfurger/kustopy
Author: Till Furger
Author-email: till@furger.net
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Requires-Dist: azure-kusto-data
Requires-Dist: azure-kusto-ingest
Requires-Dist: pandas
Requires-Dist: koalas

Install the package using git
```bash
pip install kustopy
```

---
**QueryClient**

Import the query client from kustopy
```python
from kustopy import KustoPyClient as kpc
```

Then set up the client
```python
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")

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)
```

We can now get a dataframe of all tables in the database
```python
query_client.get_table_names()
```

and use specific queries to get data from a table to a dataframe
```python
query_client.query_to_df('SampleTable | take 100 | where fruit=="apple"')
```

---
**IngestionClient**

following...



