Links
AI / Agents
Developers
Community
Full license MIT
Meta
Requires: Python >=3.10
Provides-Extra: duckdb
Package Info
dazapiz
The Azure helpers azure-identity lacks: your az login in Python, carried into Spark, DuckDB and any Azure REST API, with one small package on top of the official SDK. Documentation: https://pedrobtz.github.io/py-dazapiz/.
- Spark from your
az login. Neither PySpark nor the Azure SDK turns anaz logininto Spark’s ABFS settings; spark_storage_conf() finds the refresh token the Azure CLI keeps and writes the keys. - A REST client for one API. ApiClient is a typed
httpxclient: bearer token, retries, parsing, and errors that never show a secret. - DuckDB secrets from any credential, scoped per storage account.
- Sign-in that works in a browser-hosted IDE: device code, browser, and a pasted-code flow for code-server and cloud notebooks.
Where azure-identity or msal already does a job, dazapiz calls it.
Installation
From PyPI:
pip install dazapizIt needs Python 3.10 or later. The duckdb extra adds the DuckDB secrets:
pip install "dazapiz[duckdb]"The development version installs from GitHub: pip install git+https://github.com/pedrobtz/py-dazapiz.
A first run
from pyspark.sql import SparkSession
from dazapiz import az_login, spark_storage_conf, refresh_token_from_az_cli
az_login() # device code, once per machine
conf = spark_storage_conf(refresh_token=refresh_token_from_az_cli())
spark = SparkSession.builder.config(map=conf).getOrCreate()- Get started: install,
az login, Spark, and the other ways to authenticate. - REST client: a typed client for one Azure-protected API, with a Petstore example.
- DuckDB: Azure secrets from any credential, scoped per account.
- Browser-hosted sign-in: device code, browser, and the pasted-code flow for code-server.
- Testing your API client: an ApiClient subclass tested in CI without Azure.
- The reference lists every public name.
Status
0.1.0 is the first release; the interface may still change before 1.0. Changes are listed in CHANGELOG.md. The design is in .agents/design.md and the order of work in .agents/roadmap.md.
License
MIT
