Skip to main content

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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codecraftai-restclient-azure 1.3.1
File Size Uploaded Provenance
codecraftai_restclient_azure-1.3.1.tar.gz 23.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for codecraftai-restclient-azure 1.3.1
File Interpreter ABI Platform
codecraftai_restclient_azure-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 52.7 kB

Release files / codecraftai_restclient_azure-1.3.1.tar.gz

Download URL codecraftai_restclient_azure-1.3.1.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5a946061ce30fe77e32ccf1bf255b8416a370074661c04f83348efb62d858aff
BLAKE2b-256 checksum
How to use checksums
89658a4b799809a5219627ff6a374b7a27b6d8b1351ee5f1f614d6acbebe89d2
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 20, 2026.

Transparency log

Release files / codecraftai_restclient_azure-1.3.1-py3-none-any.whl

Download URL codecraftai_restclient_azure-1.3.1-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9c6f5a362098fe53c39fc984622f9f6ecba122714df2ecdf7791ed7cbbab3c2
BLAKE2b-256 checksum
How to use checksums
84712005b1cb89aa8ea39431afd621a7e8d19070a13b6f3e5e61e68e4edd7d07
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 20, 2026.

Transparency log

Security for codecraftai-restclient-azure 1.3.1

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.

Select from 2 files

Attestation for codecraftai_restclient_azure-1.3.1.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 20, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page