Skip to main content

Microsoft Azure Kusto Library for Python

Overview

from azure.kusto.data import KustoClient, KustoConnectionStringBuilder

cluster = "<insert here your cluster name>"
client_id = "<insert here your AAD application id>"
client_secret = "<insert here your AAD application key>"
authority_id = "<insert here your AAD tenant id>"

kcsb = KustoConnectionStringBuilder.with_aad_application_key_authentication(cluster, client_id, client_secret, authority_id)
# It is a good practice to re-use the KustoClient instance, as it maintains a pool of connections to the Kusto service.
# This sample shows how to create a client and close it in the same scope, for demonstration purposes.
with KustoClient(kcsb) as client:
    db = "Samples"
    query = "StormEvents | take 10"

    response = client.execute(db, query)
    for row in response.primary_results[0]:
        print(row[0], " ", row["EventType"])

Kusto Python Client Library provides the capability to query Kusto clusters using Python. It is Python 3.x compatible and supports all data types through familiar Python DB API interface.

It’s possible to use the library, for instance, from Jupyter Notebooks. which are attached to Spark clusters, including, but not exclusively, Azure Databricks. instances.

Async Client

Kusto now provides an asynchronous client for queries.

To use the client, first install the package with the “aio” extra:

pip install azure-kusto-data[aio]

The async client uses exact same interface as the regular client, except that it lives in the azure.kusto.data.aio namespace, and it returns Futures you will need to await its

from azure.kusto.data import KustoConnectionStringBuilder
from azure.kusto.data.aio import KustoClient

cluster = "<insert here your cluster name>"
client_id = "<insert here your AAD application id>"
client_secret = "<insert here your AAD application key>"
authority_id = "<insert here your AAD tenant id>"


async def sample():
    kcsb = KustoConnectionStringBuilder.with_aad_application_key_authentication(cluster, client_id, client_secret, authority_id)
    async with KustoClient(kcsb) as client:
        db = "Samples"
        query = "StormEvents | take 10"

        response = await client.execute(db, query)
        for row in response.primary_results[0]:
            print(row[0], " ", row["EventType"])

Metadata

Release files for azure-kusto-data 6.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for azure-kusto-data 6.0.6
File Size Uploaded Provenance Actions
azure_kusto_data-6.0.6.tar.gz 40.4 kB With provenance Details for azure_kusto_data-6.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for azure-kusto-data 6.0.6
File Interpreter ABI Platform Actions
azure_kusto_data-6.0.6-py3-none-any.whl Python 3 none any Details for azure_kusto_data-6.0.6-py3-none-any.whl

Total release size: 92.7 kB

Release files / azure_kusto_data-6.0.6.tar.gz

Download URL azure_kusto_data-6.0.6.tar.gz
Size 40.4 kB
Tags Source
SHA-256 checksum
How to use checksums
225321b9d3e9c56f0b46bda6182ffd6cf0e38d721d8ef6638d9a4b2b28fee4e5
BLAKE2b-256 checksum
How to use checksums
131b253859f37d19400c665977701d216d93e71ad07912061691a37afe59844c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / azure_kusto_data-6.0.6-py3-none-any.whl

Download URL azure_kusto_data-6.0.6-py3-none-any.whl
Size 52.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de9db3e0bc30a317cebe75a7a39ce6deab5b4052ab01f606a6d0977b6a82c2e7
BLAKE2b-256 checksum
How to use checksums
10d0235c74f12b310f68ea6ce1c3be82c707dfd11de50db88bbc2f4280c92069
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for azure-kusto-data 6.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for azure_kusto_data-6.0.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

6.0.6 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page