This sample shows how to use durabletask.extensions.history_export to
export the event history of terminal orchestrations to Azure Blob
Storage. It uses the in-memory backend, so it only needs Azurite (the
local Azure Storage emulator) — no other services or accounts.
pip install durabletask[history-export-azure]Start Azurite locally:
azurite --silent --blobPort 10000python app.pyThe script:
- Spins up an in-memory durabletask backend.
- Schedules five small orchestrations to populate terminal history.
- Creates an export job that scans the recent time window and writes
each instance's history to the
history-export-samplecontainer as gzipped JSONL. - Polls the job through
ExportHistoryClient.wait_for_joband prints the final status.
Tip
Set STORAGE_CONNECTION_STRING to point at a real Azure Storage
account instead of Azurite. Set EXPORT_CONTAINER to override the
default destination container name (history-export-sample).