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.1.tar.gz (10.8 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.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file topaz_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: topaz_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 10.8 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.1.tar.gz
Algorithm Hash digest
SHA256 30c9a666b76ab1a3772f23abba76079dbb9fbc66689f8bdb49e54e4bf448ca42
MD5 6017b8e9205c647ff54264a27480c95d
BLAKE2b-256 18425747e0faaf2feb5b2181ddc62b325fa37ba7646f80c045ea2a250618785a

See more details on using hashes here.

Provenance

The following attestation bundles were made for topaz_sdk-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: topaz_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bb18ca8d9eb7a0c10663291e8d9af3b3099d60559e865add501bf68037d65be1
MD5 a743508a048c2539efd07ed63f963d59
BLAKE2b-256 22c09f233dbe50052c260b514548bb397cda55faea51ee3c2d29e25e17deb51d

See more details on using hashes here.

Provenance

The following attestation bundles were made for topaz_sdk-0.1.1-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