Skip to main content

Typed Python interface to AWS Simple Workflow service

Project description

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 has a slight change in terminology from AWS SDKs/APIs/docs:

  • 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

This is to simplify symbol names.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swf_typed-1.1.3rc0.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swf_typed-1.1.3rc0-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file swf_typed-1.1.3rc0.tar.gz.

File metadata

  • Download URL: swf_typed-1.1.3rc0.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for swf_typed-1.1.3rc0.tar.gz
Algorithm Hash digest
SHA256 88b7355bde66d774b8d159d7022df264ec9edca6c69d361c61867967f6046545
MD5 a0d17d733bee951d79172eddc8690206
BLAKE2b-256 7a93889ba475e9ba6aafb3798450b16bfa74050f5d801fda12b5f1c16cdc58b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for swf_typed-1.1.3rc0.tar.gz:

Publisher: publish-python-package.yml on EpicWink/python-swf-typed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file swf_typed-1.1.3rc0-py3-none-any.whl.

File metadata

  • Download URL: swf_typed-1.1.3rc0-py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for swf_typed-1.1.3rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 3749818c247b9a5f11fee5e8e31064900b173de3f442b05b1d0fba377620e338
MD5 6f68cf2bbe0e52cd929c6fd1d676fb9c
BLAKE2b-256 f0b8cdebfaf3231eee8656a51923be7aba113d4a8d012eb61d306871ea4c0b45

See more details on using hashes here.

Provenance

The following attestation bundles were made for swf_typed-1.1.3rc0-py3-none-any.whl:

Publisher: publish-python-package.yml on EpicWink/python-swf-typed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page