codecraftai-restclient-azure
A pure-Python client for Azure Resource Manager, replacing the azure-identity and azure-mgmt-* SDKs.
ARM is one uniform REST protocol: every resource is addressed by a path under /subscriptions/{id}/resourceGroups/{name}/providers/..., every call carries an api-version, collections page through nextLink, and mutations may be long-running. One transport therefore serves all five management clients — the SDK’s split into separate packages is packaging, not protocol.
Usage
from ccai.restclient.azure.azurearmclient import AzureArmClient
from ccai.restclient.azure.azuretokenprovider import AzureTokenProvider
from ccai.restclient.azure.managementclients import (
build_management_clients
)
tokens = AzureTokenProvider(tenant_id=tenant, client_id=client,
client_secret=secret)
arm = AzureArmClient(subscription_id=subscription, token_provider=tokens)
clients = build_management_clients(arm_client=arm)
poller = clients["network"].virtual_networks.begin_create_or_update(
resource_group_name="rg-a", virtual_network_name="vnet-a",
parameters={"location": "eastus",
"properties": {"addressSpace": {
"addressPrefixes": ["10.0.0.0/16"]}}})
vnet = poller.result(600)
print(vnet.address_space.address_prefixes)
Design notes
Responses flatten ``properties``. ARM nests most of a resource’s state under properties, while the SDK’s models flattened it — consumer code reads vnet.address_space. AzureObject resolves the literal key first, then a spelling-insensitive match, then repeats both inside properties. The top level wins, so a resource’s own id / name / location are never shadowed by a same-named property.
Name matching normalises both sides by removing underscores and lowercasing, rather than converting camelCase to snake_case. ARM has acronym-suffixed fields like diskSizeGB, and a naive converter yields disk_size_g_b — which would never match the disk_size_gb that consumer code asks for.
Authentication needs no cryptography. A service principal exchanges its client secret at the tenant’s OAuth2 endpoint; a managed identity asks the instance metadata service. Tokens are cached and refreshed early, because a token that passes the expiry check and then expires in flight fails the request it was fetched for — mid-apply.
Long-running operations are distinguished from failures. A mutation that ARM answers synchronously is not turned into a wait. A poller that reaches Failed/Canceled raises AzureOperationError; one that runs out of time raises AzureOperationTimeout, which is deliberately a different type — the operation may still be running, so reporting it as a failure would be wrong.
``ResourceNotFoundError`` keeps its SDK name, because consumer code catches that name to mean “absent, carry on” — listing against a resource group that does not exist yet, for instance.
Metadata
Release files for codecraftai-restclient-azure 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| codecraftai_restclient_azure-1.3.0.tar.gz | 23.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codecraftai_restclient_azure-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.9 kB
Release files / codecraftai_restclient_azure-1.3.0.tar.gz
| Download URL | codecraftai_restclient_azure-1.3.0.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99c95a45296440996173eae03f2920366a0578322058a313d340ae262f939bf1
|
|
BLAKE2b-256 checksum How to use checksums |
f69139c15e8f10d6950835277a23daf727b837b9be178d5b63d5843c54b36b13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / codecraftai_restclient_azure-1.3.0-py3-none-any.whl
| Download URL | codecraftai_restclient_azure-1.3.0-py3-none-any.whl |
|---|---|
| Size | 29.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2f06186e1641798f84a7ae9ad6c378493f6c2d419441885969bc75744d6f77b
|
|
BLAKE2b-256 checksum How to use checksums |
773d3497b489c0ee91079991bc3cab38c21cf525261d532328d355e95e663437
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logSecurity for codecraftai-restclient-azure 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for codecraftai_restclient_azure-1.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.