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.5

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.5
File Size Uploaded Provenance Actions
azure_kusto_data-6.0.5.tar.gz 40.3 kB With provenance Details for azure_kusto_data-6.0.5.tar.gz

Built distribution (wheel)

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

Total release size: 92.5 kB

Release files / azure_kusto_data-6.0.5.tar.gz

Download URL azure_kusto_data-6.0.5.tar.gz
Size 40.3 kB
Tags Source
SHA-256 checksum
How to use checksums
385982a43e77ef7971b38a4770cdc489775a62475dcde798a0abccbaa493d208
BLAKE2b-256 checksum
How to use checksums
d69775a963bcfe7c8280471b30ffd998531dfcf66beb374eee23ad1bb944a958
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 24, 2026.

Transparency log

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

Download URL azure_kusto_data-6.0.5-py3-none-any.whl
Size 52.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ef088f4ce7966a1b2d00e8a2c105cf02e42f2386ba1a2f6e5b4666d470163a5
BLAKE2b-256 checksum
How to use checksums
aa88b3c5755e7ef95267c4141f1786709e670053ab3d683716696affef69090e
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 24, 2026.

Transparency log

Security for azure-kusto-data 6.0.5

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.5.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 24, 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.5 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