Python SDK for the Topaz Azure emulator
Project description
topaz-sdk
Python SDK for Topaz — the single-binary Azure emulator.
What is Topaz?
Topaz is a single-binary local Azure emulator. Instead of running Azurite for Storage, a separate emulator for Service Bus, and another for Key Vault — you run one tool that covers the control and data planes of many Azure services, emulates ARM deployments, and implements Azure RBAC, all with no Azure subscription required.
Installation
pip install topaz-sdk
Requires Python 3.10 or later.
Quick start
from topaz_sdk import AzureLocalCredential, TopazArmClient, GLOBAL_ADMIN_ID
# Authenticate as the built-in admin user
credential = AzureLocalCredential(GLOBAL_ADMIN_ID)
client = TopazArmClient(credential)
# Create a subscription and resource group
client.create_subscription("my-subscription", "00000000-0000-0000-0000-000000000001")
client.create_resource_group(
"00000000-0000-0000-0000-000000000001",
"my-resource-group",
"westeurope",
)
Using standard Azure SDK clients
topaz-sdk provides credentials and helpers that work directly with the standard azure-mgmt-* packages:
from azure.mgmt.keyvault import KeyVaultManagementClient
from topaz_sdk import AzureLocalCredential, GLOBAL_ADMIN_ID, DEFAULT_RESOURCE_MANAGER_PORT
credential = AzureLocalCredential(GLOBAL_ADMIN_ID)
client = KeyVaultManagementClient(
credential=credential,
subscription_id="00000000-0000-0000-0000-000000000001",
base_url=f"https://topaz.local.dev:{DEFAULT_RESOURCE_MANAGER_PORT}",
credential_scopes=["https://topaz.local.dev/.default"],
)
Point any azure-mgmt-* client at Topaz by overriding base_url and credential_scopes. No application code changes are required.
Provided classes
| Symbol | Description |
|---|---|
AzureLocalCredential |
TokenCredential implementation for Topaz's built-in identity endpoint |
TopazArmClient |
Thin HTTP client for management-plane operations not covered by azure-mgmt-resource (subscription lifecycle, resource groups, management groups, role assignments) |
GLOBAL_ADMIN_ID |
Constant for the built-in admin user ID (00000000-0000-0000-0000-000000000000) |
DEFAULT_RESOURCE_MANAGER_PORT |
Default ARM port (8899) |
Requirements
The SDK expects a running Topaz host. See the Topaz quickstart for installation instructions.
SSL verification uses the REQUESTS_CA_BUNDLE environment variable. When running inside the Topaz test fixture container this is set automatically.
Links
- Docs: topaz.thecloudtheory.com
- Source: github.com/TheCloudTheory/Topaz
- Issues: github.com/TheCloudTheory/Topaz/issues
- Discord: discord.gg/eGTkS76w
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
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 topaz_sdk-0.1.2.tar.gz.
File metadata
- Download URL: topaz_sdk-0.1.2.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ab8d28855a0bf53a3aeed25249d464efe391315ad392ce50c4f4ff502ba53a9
|
|
| MD5 |
18fff07b6dff8ecf3203ae8c5fef7810
|
|
| BLAKE2b-256 |
3f1497a87a3deac039cd43fc49e0926073185879fad85fb4c9d4f59d1b8a833a
|
Provenance
The following attestation bundles were made for topaz_sdk-0.1.2.tar.gz:
Publisher:
build-and-publish-python-sdk.yml on TheCloudTheory/Topaz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
topaz_sdk-0.1.2.tar.gz -
Subject digest:
0ab8d28855a0bf53a3aeed25249d464efe391315ad392ce50c4f4ff502ba53a9 - Sigstore transparency entry: 1615108004
- Sigstore integration time:
-
Permalink:
TheCloudTheory/Topaz@5349e00e67c1c5692f57364f02a7ff9661f35b13 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/TheCloudTheory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish-python-sdk.yml@5349e00e67c1c5692f57364f02a7ff9661f35b13 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file topaz_sdk-0.1.2-py3-none-any.whl.
File metadata
- Download URL: topaz_sdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b50307a10df20cb2c4f6b2ad85aaebadbeb0cdf2ebb620b43ca0fdd52a30a2f
|
|
| MD5 |
1c47f37708d1857cb0206e2d375a1ffc
|
|
| BLAKE2b-256 |
c775dbea95bf6b681e3153a060e1cd9987958ff75c2908ec227aee54a2bfe234
|
Provenance
The following attestation bundles were made for topaz_sdk-0.1.2-py3-none-any.whl:
Publisher:
build-and-publish-python-sdk.yml on TheCloudTheory/Topaz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
topaz_sdk-0.1.2-py3-none-any.whl -
Subject digest:
0b50307a10df20cb2c4f6b2ad85aaebadbeb0cdf2ebb620b43ca0fdd52a30a2f - Sigstore transparency entry: 1615108007
- Sigstore integration time:
-
Permalink:
TheCloudTheory/Topaz@5349e00e67c1c5692f57364f02a7ff9661f35b13 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/TheCloudTheory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish-python-sdk.yml@5349e00e67c1c5692f57364f02a7ff9661f35b13 -
Trigger Event:
workflow_dispatch
-
Statement type: