Skip to main content

AI / Agents

Skills
llms.txt
llms-full.txt

Developers

pedrobtz

Author

Community

Full license MIT

Meta

Requires: Python >=3.10
Provides-Extra: duckdb
Package Info

dazapiz

CI Docs PyPI

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 an az login into 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 httpx client: 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 dazapiz

It 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()

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