Async 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 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.3.0.tar.gz
(7.3 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
File details
Details for the file pyzurecli-0.3.0.tar.gz.
File metadata
- Download URL: pyzurecli-0.3.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf6afb1492c6fd70a8fc2031c5c6ec762fb0bbe9c056aba1ebe5f3c661860bc2
|
|
| MD5 |
ed354b89a87411869df1e9a6106de988
|
|
| BLAKE2b-256 |
120a3be9b3d8bb26e8a62bf0faedeaf8e38ca68038a93b0ea04c0e962e4703db
|
File details
Details for the file pyzurecli-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pyzurecli-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24ff188cea3f415468b3ea0e46e9f8f4efcb1b57f1911590992e34e83ee8e826
|
|
| MD5 |
ea40df56d3956d9e6ef4ced625ed5c7a
|
|
| BLAKE2b-256 |
b883b5af4d5500d5d8071596b2d6237db0fc897c9b0e1396dfba7ae2f29dba37
|