Python helpers for Azure Storage Blob and Queue operations.
Project description
appfx-storage
Python helpers for Azure Storage Blob and Queue operations.
The appfx-storage package exposes the appfx.storage import namespace. It
wraps common Azure Blob Storage and Azure Queue Storage tasks with sync and
async helper classes, typed package metadata, and release-ready packaging.
Features
- Blob container and blob upload, download, listing, delete, metadata, and SAS URL helpers.
- Queue create, send, receive, peek, update, delete, clear, and worker-pattern helpers.
- Sync and async clients for both blob and queue operations.
- Azure credential support through connection strings, account names, managed
identity, and
DefaultAzureCredential. - Python 3.12 and 3.13 support.
Installation
python -m pip install appfx-storage
For local development:
python -m pip install -e ".[dev]"
Quickstart
Set the storage account name before running examples. When account_name
is provided, the helpers use Azure Identity DefaultAzureCredential, so local
development can authenticate with Azure CLI and Azure-hosted apps can use
managed identity. Connection strings are supported, but examples intentionally
prefer Entra ID authentication.
export AZURE_STORAGE_ACCOUNT_NAME=your-storage-account
az login
Do not commit .env files, connection strings, account keys, or generated SAS
URLs.
Async blob usage
import asyncio
import os
from appfx.storage import AsyncStorageBlobHelper
async def main() -> None:
account_name = os.environ["AZURE_STORAGE_ACCOUNT_NAME"]
async with AsyncStorageBlobHelper(account_name=account_name) as helper:
await helper.create_container("documents")
await helper.upload_blob("documents", "hello.txt", "Hello from appfx-storage")
blobs = await helper.list_blobs("documents")
print([blob["name"] for blob in blobs])
asyncio.run(main())
Sync blob usage
import os
from appfx.storage import StorageBlobHelper
helper = StorageBlobHelper(account_name=os.environ["AZURE_STORAGE_ACCOUNT_NAME"])
helper.create_container("documents")
helper.upload_blob("documents", "hello.txt", "Hello from appfx-storage")
print(helper.list_blobs("documents"))
Async queue usage
import asyncio
import os
from appfx.storage import AsyncStorageQueueHelper
async def main() -> None:
account_name = os.environ["AZURE_STORAGE_ACCOUNT_NAME"]
async with AsyncStorageQueueHelper(account_name=account_name) as helper:
await helper.create_queue("jobs")
result = await helper.send_message("jobs", {"task": "process-file"})
print(f"Sent message: {result['message_id']}")
messages = await helper.receive_messages("jobs")
print([message["message_id"] for message in messages])
asyncio.run(main())
Sync queue usage
import os
from appfx.storage import StorageQueueHelper
helper = StorageQueueHelper(account_name=os.environ["AZURE_STORAGE_ACCOUNT_NAME"])
helper.create_queue("jobs")
result = helper.send_message("jobs", {"task": "process-file"})
print(f"Next visible at: {result['next_visible_on']}")
print([message["message_id"] for message in helper.peek_messages("jobs")])
Tests and quality checks
python -m pip install -e ".[dev]"
python -m ruff check .
python -m ruff format --check .
python -m mypy
python -m pytest --cov
python -m build
python -m twine check dist/*
Live Azure tests and examples require your own Azure Storage account and credentials. Keep live credentials out of source control and CI logs.
Release notes
- Package name:
appfx-storage - Import namespace:
appfx.storage - Repository: https://github.com/Dongbumlee/appfx-storage
- PyPI publishing is configured for trusted publishing from GitHub Actions on published releases and manual workflow dispatch.
License
MIT License - see LICENSE for details.
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 appfx_storage-0.1.1.tar.gz.
File metadata
- Download URL: appfx_storage-0.1.1.tar.gz
- Upload date:
- Size: 37.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f84c7ac825d65ee67eada6470137def89cb1a0e587d32a49277684d43b9f44f
|
|
| MD5 |
50debf6c44d715260cfdbd0544680fd7
|
|
| BLAKE2b-256 |
8e0580b37e65e95c55cf06ce4f21e37db5b0a0ae190b0321d5a09054411a5419
|
Provenance
The following attestation bundles were made for appfx_storage-0.1.1.tar.gz:
Publisher:
publish.yml on Dongbumlee/appfx-storage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
appfx_storage-0.1.1.tar.gz -
Subject digest:
4f84c7ac825d65ee67eada6470137def89cb1a0e587d32a49277684d43b9f44f - Sigstore transparency entry: 1647966991
- Sigstore integration time:
-
Permalink:
Dongbumlee/appfx-storage@f4b6cba9b1710890c6ba01c5978291b09f0513a3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Dongbumlee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f4b6cba9b1710890c6ba01c5978291b09f0513a3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file appfx_storage-0.1.1-py3-none-any.whl.
File metadata
- Download URL: appfx_storage-0.1.1-py3-none-any.whl
- Upload date:
- Size: 35.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eb62f5d54f58ad0251ca475758170f544fb33cfc553843621ef54720bb85509
|
|
| MD5 |
4e21fb5d04564ed7aa58c369a9622ffc
|
|
| BLAKE2b-256 |
a73af14d46861c8674c2d66f49d3e932030da58bafcea1ddb8ce1e2050ba1684
|
Provenance
The following attestation bundles were made for appfx_storage-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on Dongbumlee/appfx-storage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
appfx_storage-0.1.1-py3-none-any.whl -
Subject digest:
6eb62f5d54f58ad0251ca475758170f544fb33cfc553843621ef54720bb85509 - Sigstore transparency entry: 1647967074
- Sigstore integration time:
-
Permalink:
Dongbumlee/appfx-storage@f4b6cba9b1710890c6ba01c5978291b09f0513a3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Dongbumlee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f4b6cba9b1710890c6ba01c5978291b09f0513a3 -
Trigger Event:
release
-
Statement type: