Skip to main content

Tools for Azure

Project description

AzureToolbox

Build, test and Package

Utilities for working with Azure services. This version provides tools for:

  • Keyvault
  • Database

Installation

pip install azuretoolbox

Keyvault

Get secrets from Azure Keyvault.

Prerequisites

To use the Keyvault utilities, you need to have the following environment variables set:

  • AZURE_TENANT_ID
  • AZURE_CLIENT_ID
  • AZURE_CLIENT_SECRET
export AZURE_TENANT_ID="<your-tenant-id>"
export AZURE_CLIENT_ID="<your-client-id>"
export AZURE_CLIENT_SECRET="<your-client-secret>"

Usage

from azuretoolbox.keyvault import KeyVault

vault_url = "https://<keyvault-name>.vault.azure.net"
secret = KeyVault(vault_url).get_secret("SecretName")
print(secret)

Database

Connect to and query an Azure SQL Database.

Prequisites

To use the Database utilities, you need to have ODBC Driver 18 for SQL Server installed. You can download it from here.

Usage

from azuretoolbox.database import Database

db = Database()
server = '<server>' # Typically 'tcp:<server-name>.database.windows.net,1433'
database = '<database-name>'
username = '<username>'
password = '<password>'
db.connect(server, database, username, password)

print(db.query('<query-string>'))

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

azuretoolbox-1.0.10.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

azuretoolbox-1.0.10-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file azuretoolbox-1.0.10.tar.gz.

File metadata

  • Download URL: azuretoolbox-1.0.10.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for azuretoolbox-1.0.10.tar.gz
Algorithm Hash digest
SHA256 9a04b603b40f5a961fa4949b9a98f26e89784e5e996a6484a93ad28752e8d049
MD5 6941a5a533d0dddd52557e5d49524871
BLAKE2b-256 410270d6ca939a9b06a3374c4e4e922f609863953686642c67428f0ffadd5f1d

See more details on using hashes here.

File details

Details for the file azuretoolbox-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: azuretoolbox-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for azuretoolbox-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 8dc6684c541addb21ca91f79b7d451f550c32d49e171740922f476e173a41301
MD5 6d17721498123e41c88603b10feefccc
BLAKE2b-256 8b473d323a1dfacafdc7a019c1183b1321985d8b75a4a734c87bb1616cb786ac

See more details on using hashes here.

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