Azure/pykusto
Azure/pykusto has 32 GitHub stars and 15 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and 0 in 15 days. Last checked 2026-11-12 08:38 UTC. Last push 2026-10-27.
Query Kusto like a pro from the comfort of your Jupyter notebook
Crecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Actualización retrasada
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalIntroduction
pykusto is an advanced Python SDK for Azure Data Explorer (a.k.a. Kusto).
Started as a project in the 2019 Microsoft Hackathon.
Getting Started
Installation
Default installation:
pip install pykusto
With dependencies required for running the tests:
pip install pykusto[test]
Without dependencies which are not needed in PySpark:
pip install pykusto --global-option pyspark
Basic usage
from datetime import timedelta
from pykusto import PyKustoClient, Query
# Connect to cluster with AAD device authentication
# Databases, tables, and columns are auto-retrieved
client = PyKustoClient('https://help.kusto.windows.net')
# Show databases
print(tuple(client.get_databases_names()))
# Show tables in 'Samples' database
print(tuple(client.Samples.get_table_names()))
# Connect to 'StormEvents' table
t = client.Samples.StormEvents
# Build query
(
Query(t)
# Access columns using table variable
.project(t.StartTime, t.EndTime, t.EventType, t.Source)
# Specify new column name using Python keyword argument
.extend(Duration=t.EndTime - t.StartTime)
# Python types are implicitly converted to Kusto types
.where(t.Duration > timedelta(hours=1))
.take(5)
# Output to pandas dataframe
.to_dataframe()
)
Retrying failed queries
# Turn on retrying for all queries
from pykusto import PyKustoClient, RetryConfig, Query
client = PyKustoClient(
"https://help.kusto.windows.net",
retry_config=RetryConfig() # Use default retry config
)
# Override retry config for specific query
Query(client.Samples.StormEvents).take(5).to_dataframe(
retry_config=RetryConfig(attempts=3, sleep_time=1, max_sleep_time=600, sleep_scale=2, jitter=1)
)
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
Explorar proyectos relacionados
Asabeneh/30-Days-Of-Python
El reto de programación 30 Days of Python es una guía paso a paso para aprender el lenguaje de programación Python en 30 días. Este reto puede llevar más de 100 días. Sigue tu propio ritmo. Estos vídeos también pueden ayudarte: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,618 estrellasgrafana/grafana
Plataforma abierta y componible de observabilidad y visualización de datos. Visualiza métricas, registros y trazas de múltiples fuentes, como Prometheus, Loki, Elasticsearch, InfluxDB, Postgres y muchas más.
77,859 estrellasredis/redis
Para los desarrolladores que crean aplicaciones en tiempo real basadas en datos, Redis es la opción preferida, la más rápida y la de más funciones como caché, servidor de estructuras de datos y motor de consultas de documentos y vectores.
77,472 estrellasapache/superset
Apache Superset es una plataforma de visualización y exploración de datos.
75,495 estrellas