Azure Storage tools for various operations
Project description
az_storage_tools
This package is developed for wrapping various Azure Storage operations.
Getting Started
You can either provide your Azure storage account details via the following env variables. Namely
AZ_STORAGE_ACCOUNT_NAME
AZ_STORAGE_KEY
or
AZ_CONNECTION_URL
Initialization via Connection String
You can initialize the AZStorageTools with a connection string via the constructor:
AZStorageTools(container_name=<container_name>,conn_str=<connection_string>)
Initialization via Account Name and Key
You can initialize the AZStorageTools with an account name and key via the constructor:
AZStorageTools(container_name=<container_name>,account_name=<account_name>, <account_key>=account_key)
Container Name
If AZStorageTools is not initialized with a container name, then following env variable must be set:
AZ_STORAGE_CONTAINER_NAME
Uploading a file to Azure Storage
If you want to upload a file (e.g. hello.txt) to a container (e.g. test-container) in your Storage Account, you can use the following code snippet:
fom az_storage_tools import AZStorageTools
az_storage = AZStorageTools(container_name="test-container", conn_str="connection_string")
with open("hello.txt", "rb") as f:
az_storage.upload_blob('hello_txt', f.read())
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 az_storage_tools-0.0.4.tar.gz.
File metadata
- Download URL: az_storage_tools-0.0.4.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed0883a0060caa568dc41e87017d03cd6b1e4fa1954a0993d1c9c6a6f4ea1cd9
|
|
| MD5 |
7e0b54ee3a98275b5b94d19a371f869d
|
|
| BLAKE2b-256 |
f87e2186724435ed12aa151c22cdda9d0abf2733455f6e9c33164b012a0c1789
|
File details
Details for the file az_storage_tools-0.0.4-py3-none-any.whl.
File metadata
- Download URL: az_storage_tools-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec6deb2a23dfd627bb5fac883d97ae5678ed6ecc0d807b44efb6807a54d4d996
|
|
| MD5 |
ab2558fbbcbc30cad5bd5792e9d619b7
|
|
| BLAKE2b-256 |
d1adcca12d95d22f7675af8eca67de6e1ccfc00e200e4a0c2848d784d405b54e
|