Azure CLI automation via Docker-based isolation
Project description
PyzureCLI
Asynchronous Azure CLI automation via Docker-based isolation.
PyzureCLI runs every az command inside a disposable Docker container, providing:
- Interactive login (device-code flow) with persistent session cache at
./azure/user - Service principal creation and managed login, cached under
./azure/sp - App registration for multi-tenant OAuth flows, configured in
./azure/app_registration
import asyncio
from pathlib import Path
from src.pyzurecli import az
async def main():
# Initialize AzureCLI client (entry via factory.py)
cli = await az.__async_init__(Path.cwd())
# Inspect current subscription metadata
meta = await cli.metadata
print("Subscription ID:", meta.subscription_id)
# Create or retrieve a Service Principal
sp = await cli.service_principal
print("SP App ID:", sp.creds.appId)
# Create or retrieve an App Registration
ar = await cli.app_registration
client_id = await ar.client_id
print("App Registration Client ID:", client_id)
# Generate an admin-consent URL
url = await ar.generate_admin_consent_url()
print("Consent URL:", url)
asyncio.run(main())
License
MIT © genderlesspit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyzurecli-0.7.1.tar.gz
(68.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pyzurecli-0.7.1-py3-none-any.whl
(378.6 kB
view details)
File details
Details for the file pyzurecli-0.7.1.tar.gz.
File metadata
- Download URL: pyzurecli-0.7.1.tar.gz
- Upload date:
- Size: 68.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.2 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a443c41913b8b95011996bb1202144814813630f9bb0a80f89e28df2e92bcdb
|
|
| MD5 |
d23f5c9823b759178cf5d2a06d33dc50
|
|
| BLAKE2b-256 |
fb7efa974c45e33e08dca98a96fa177a3870308d0c61251e6de204fccce2f50c
|
File details
Details for the file pyzurecli-0.7.1-py3-none-any.whl.
File metadata
- Download URL: pyzurecli-0.7.1-py3-none-any.whl
- Upload date:
- Size: 378.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.2 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c1f9c5bef6fe50b941b73c811bbdac70b8c791b2d0e2303bfc2c85af59dedac
|
|
| MD5 |
0c32b318ea8ba876c59f4449d500e1b8
|
|
| BLAKE2b-256 |
7cb8a0cf2ae0ca48564d125dacee9998c5e827c5de591ef3ea795bdd1bdc3b29
|