An async python Background task system using Azure Service Bus Queues
Reason this release was yanked:
task IDs not unique
Project description
Boilermaker
Async Python background tasks with Azure ServiceBus
Boilermaker is a lightweight task runner exclusively for async Python and Azure Service Bus Queues. If you need a fully-featured task runner with multiple backends, consider Celery instead.
Quick Start
Install
pip install "boilermaker-servicebus"
Basic Usage
import asyncio
from boilermaker import Boilermaker, retries
from boilermaker.config import Config
from boilermaker.service_bus import AzureServiceBus
# Configure (loads from environment variables)
config = Config()
service_bus = AzureServiceBus.from_config(config)
# Create app with shared state
class AppState:
def __init__(self):
self.data = {"count": 0}
app = Boilermaker(AppState(), service_bus)
# Define background task
async def process_data(state, data_id):
"""state is injected automatically as first parameter"""
print(f"Processing {data_id}")
state.data["count"] += 1
return f"Processed {data_id}"
# Register task
app.register_async(process_data, policy=retries.RetryPolicy.default())
# Publish task
async def main():
await app.apply_async(process_data, "item_123")
# Run worker (separate process)
async def worker():
await app.run() # Runs forever
if __name__ == "__main__":
asyncio.run(main())
Environment Variables
export SERVICE_BUS_NAMESPACE_URL="https://your-namespace.servicebus.windows.net/"
export SERVICE_BUS_QUEUE_NAME="your-queue-name"
Key Features
- Async-only: Built for async Python applications
- Retry Policies: Exponential, linear, and fixed backoff strategies
- Task Chaining: Success/failure callbacks and workflows
Documentation
- Getting Started - Installation and basic usage
- Callbacks & Chains - Task workflows
- Retry Policies - Error handling and retries
- Task Graphs - Task Graphs
- Task Registration - Task Registration
- API Reference - Complete API docs
Requirements
- Python 3.11+
- Azure ServiceBus namespace and queue
- All task arguments must be JSON-serializable
TLA+ Specs Running
# Safety (exhaustive, terminates):
java -jar tla2tools.jar -workers auto \
-config specs/TaskGraphTinySafety.cfg specs/TaskGraphTiny.tla
# Liveness (simulation, bounded depth: not exhaustive but practical):
java -jar tla2tools.jar -simulate num=100000 -depth 200 \
-config specs/TaskGraphTiny.cfg specs/TaskGraphTiny.tla
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 boilermaker_servicebus-1.1.0.tar.gz.
File metadata
- Download URL: boilermaker_servicebus-1.1.0.tar.gz
- Upload date:
- Size: 169.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f057cee4c074982d03703c540be74744cfa26dff1acf804541c51a1100fe72f
|
|
| MD5 |
7bbf5c7cf3bf0d692a17797a46246563
|
|
| BLAKE2b-256 |
143075cd36bf2a6a14fbc08838cfc8670f90a3fb4b09708ff81f5adbb886e77c
|
Provenance
The following attestation bundles were made for boilermaker_servicebus-1.1.0.tar.gz:
Publisher:
release.yaml on MulliganFunding/boilermaker-servicebus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
boilermaker_servicebus-1.1.0.tar.gz -
Subject digest:
8f057cee4c074982d03703c540be74744cfa26dff1acf804541c51a1100fe72f - Sigstore transparency entry: 1332230756
- Sigstore integration time:
-
Permalink:
MulliganFunding/boilermaker-servicebus@bd2a97f3d9fb2cb001b1aee4e6a8c4b211e57849 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/MulliganFunding
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@bd2a97f3d9fb2cb001b1aee4e6a8c4b211e57849 -
Trigger Event:
release
-
Statement type:
File details
Details for the file boilermaker_servicebus-1.1.0-py3-none-any.whl.
File metadata
- Download URL: boilermaker_servicebus-1.1.0-py3-none-any.whl
- Upload date:
- Size: 198.6 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 |
9b3e37be8d4b39ae0831d02bb63320a72f6fa1030050ac4b7491130608a2701b
|
|
| MD5 |
1de817b47b6f4ecb1f898d3ed93d8108
|
|
| BLAKE2b-256 |
9cf95714b36845dfb8dbacaa9e6f1adfa4ae5014a1b06c80e226d47a7771345b
|
Provenance
The following attestation bundles were made for boilermaker_servicebus-1.1.0-py3-none-any.whl:
Publisher:
release.yaml on MulliganFunding/boilermaker-servicebus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
boilermaker_servicebus-1.1.0-py3-none-any.whl -
Subject digest:
9b3e37be8d4b39ae0831d02bb63320a72f6fa1030050ac4b7491130608a2701b - Sigstore transparency entry: 1332230889
- Sigstore integration time:
-
Permalink:
MulliganFunding/boilermaker-servicebus@bd2a97f3d9fb2cb001b1aee4e6a8c4b211e57849 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/MulliganFunding
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@bd2a97f3d9fb2cb001b1aee4e6a8c4b211e57849 -
Trigger Event:
release
-
Statement type: