Registry / azure / azure-devtools

azure-devtools

JSON →
library1.2.0pypypiunverified

Microsoft Azure Development Tools for SDK – provides utilities for CI (Git helpers, GitHub REST API wrapper, issue bot framework), scenario testing (resource management, playback support), and config management. Current version: 1.2.0. Released September 2020, low maintenance cadence.

pip install azure-devtools
INSTALL
IMPORT
SIG · AZURE-DEVTOOLS
A
azure-devtools
azurepythonv1.2.0
Install
2.7s avg
Import
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.000s · 23MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ResourceGroupPreparer
from azure_devtools.scenario_tests.preparers import ResourceGroupPreparer
from azure_devtools.scenario_tests.preparers import ResourceGroupPreparer

Example of using ResourceGroupPreparer in a test to create and clean up a resource group.

from azure_devtools.scenario_tests.preparers import ResourceGroupPreparer from azure.mgmt.resource import ResourceManagementClient from azure.identity import DefaultAzureCredential import os credential = DefaultAzureCredential() subscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', '') @ResourceGroupPreparer() def test_resource_group(resource_group, **kwargs): client = ResourceManagementClient(credential, subscription_id) rg = client.resource_groups.get(resource_group.name) print(f"Resource group {rg.name} exists in {rg.location}")
Debug
Known issues
gotchaResourceGroupPreparer only works with positional arguments. If you change the function signature and the resource_group parameter is not the first argument, the preparer will fail silently.
fix
Ensure resource_group is the first parameter of your test function after self if using pytest or unittest method.
affects: <=1.2.0
deprecatedThe ci_tools module (Git helpers, GitHub REST API wrapper) is no longer actively maintained and may be removed in future versions. Prefer dedicated GitHub Actions or Azure DevOps tasks.
fix
Migrate to GitHub CLI (`gh`) or Azure DevOps REST API directly.
affects: 1.1.0 - 1.2.0
breakingIn version 1.0.0, the resource removal sequence was reversed. Tests that relied on a specific deletion order may fail or leave resources behind.
fix
Check your resource cleanup logic; use ResourceGroupPreparer with 'random_name' setting to avoid dependency on deletion order.
affects: <=0.5.5 -> 1.0.0
Upgrade
Version history
1.2.0latest on PyPI · released Jul 28, 2020
Audit
Dependencies
configparserrequiredUsed by config management module
vcrpyoptionalUsed for recording/playback in scenario tests
azure-mgmt-resourceoptionalResource management for test cleanup
Agent activity
37 hits · last 30 days
node
32
OpenAI (training)
1
Resources
azure-devtools — pip install azure-devtools · libregistry