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.9.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

azuretoolbox-1.0.9-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for azuretoolbox-1.0.9.tar.gz
Algorithm Hash digest
SHA256 8ec119e32ff787be44394a484e66e3f527dc67ccec4acbee9bb8b74ed5c3aa57
MD5 c3a7780b0eb78c0915531a70a9a88f4e
BLAKE2b-256 c4382e35e82ae9c6ba2e6003df87999e75f57347e8aa9e3db23ca9aedd8cd340

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for azuretoolbox-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 04c263edf45896c05aa0d91236153bdb8f72f02d23e977d294b71680969449e5
MD5 4c762e3428363c713f1bdd3cd1597b70
BLAKE2b-256 03101a808964803f3640dd64b880ef864643b5149f0173e6ad542071065d6fb0

See more details on using hashes here.

Supported by

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