Skip to main content

Python SDK for the Topaz Azure emulator

Project description

topaz-sdk

Python SDK for Topaz — the single-binary Azure emulator.

PyPI License Docs

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topaz_sdk-0.1.2.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topaz_sdk-0.1.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

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

Hashes for topaz_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0ab8d28855a0bf53a3aeed25249d464efe391315ad392ce50c4f4ff502ba53a9
MD5 18fff07b6dff8ecf3203ae8c5fef7810
BLAKE2b-256 3f1497a87a3deac039cd43fc49e0926073185879fad85fb4c9d4f59d1b8a833a

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for topaz_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b50307a10df20cb2c4f6b2ad85aaebadbeb0cdf2ebb620b43ca0fdd52a30a2f
MD5 1c47f37708d1857cb0206e2d375a1ffc
BLAKE2b-256 c775dbea95bf6b681e3153a060e1cd9987958ff75c2908ec227aee54a2bfe234

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page