Skip to main content

Python interface to SWF

Typed Python interface to AWS Simple Workflow service

  • Type annotations
  • Explicit exceptions
  • Execution state construction
  • Consistent method/attribute/parameter names (see below)
  • Consistent model struture
  • Automatic flattening of paged-list responses
    • next-page calls are run concurrently and on-demand
  • Better execution filtering

The most interesting part is state construction: given an execution history, this library can build a full state of the execution and all of its tasks with all details; see swf_typed.build_state. The rest of the API simply wraps and closely matches AWS's SWF API.

See also

Installation

pip install swf-typed

Usage

See the full documentation.

Example

import swf_typed

execution = swf_typed.ExecutionId(id="spam", run_id="abcd1234")
execution_details = swf_typed.describe_execution(execution, domain="eggs")
print(execution_details.configuration)

events = swf_typed.get_execution_history(execution, domain="eggs")
state = swf_typed.build_state(events)
for task in state.tasks:
    print(task.status)

Terminology

This library uses a slight terminology change from SWF SDKs/APIs:

  • Workflow type -> workflow
  • Workflow execution -> execution
  • Workflow execution workflowId -> execution ID
  • Activity type -> activity
  • Activity task -> task
  • Activity worker -> worker
  • Activity task activityId -> task ID

Release files for swf-typed 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swf-typed 1.1.2
File Size Uploaded
swf_typed-1.1.2.tar.gz 32.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swf-typed 1.1.2
File Interpreter ABI Platform
swf_typed-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 64.9 kB

Release files / swf_typed-1.1.2.tar.gz

Download URL swf_typed-1.1.2.tar.gz
Size 32.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0fc62d70b2aae41b6dbd208b5f8a0f04403b3ed301a5bb62a3c5bd11c3e8d36b
BLAKE2b-256 checksum
How to use checksums
bc2443439375c9329cc9509b22ef0bbc88caa8c24eef45a7bf9b536c98a72621
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / swf_typed-1.1.2-py3-none-any.whl

Download URL swf_typed-1.1.2-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5848f79131820dd4576e25cd2bfae7b34c7bd17ca6b6cb89439fd7463c2ace94
BLAKE2b-256 checksum
How to use checksums
54c9337418933a5757ce326dae399e95a09ea97a66629cae515ec42ae98406fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page