Skip to main content

No project description provided

Project description

AirFunctions

AirFunctions is a Python framework that brings Airflow-like workflow orchestration to AWS Step Functions. It provides an intuitive Python API for building, testing, and deploying complex state machines while maintaining the reliability and scalability of AWS Step Functions.

Features

  • Airflow-like Python API: Write AWS Step Functions workflows using familiar Python syntax
  • Local Testing: Test your workflows locally before deployment
  • Easy Composition: Build complex state machines using simple operators like >> and conditional logic
  • Fast Deployment: Streamlined deployment process using Terraform
  • Lambda Integration: Seamless integration with AWS Lambda functions

Quick Start

from airfunctions.bundle import Config, TerraformBundler
from airfunctions.steps import Choice, Pass, lambda_task

# Define your Lambda tasks
@lambda_task
def step_1(event, context):
    return event

# Create workflows using familiar operators
workflow = (
    step_1 
    >> Pass("pass1") 
    >> Choice("my_choice", default=step_2).choose(
        condition=step_1.output("value") == 10, 
        next_step=step_3
    )
)

# Deploy to AWS Step Functions
workflow.to_statemachine("my-workflow")

# Configure and deploy using Terraform
Config().resource_prefix = "my-project-"
bundler = TerraformBundler()
bundler.validate()
bundler.apply()

Key Concepts

  • Lambda Tasks: Decorate your Python functions with @lambda_task to convert them into AWS Lambda functions
  • Flow Operators: Use >> to chain steps together
  • Conditional Logic: Build branching workflows using Choice steps
  • Parallel Execution: Run steps in parallel using list syntax
  • State Management: Access task outputs using the .output() method

Installation

pip install airfunctions

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

airfunctions-0.2.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

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

airfunctions-0.2.0-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file airfunctions-0.2.0.tar.gz.

File metadata

  • Download URL: airfunctions-0.2.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.7 Darwin/24.1.0

File hashes

Hashes for airfunctions-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fe9af154d47c9f05f63621c11730b645d4b88ac6c6b56c3cffe407abade9f325
MD5 308b49f9a3bb25501bdaf09894e5bc15
BLAKE2b-256 b905e51dd8d348a33467c13a4ab3a980b7446aaca7ee684beeb1a6ddecbab878

See more details on using hashes here.

File details

Details for the file airfunctions-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: airfunctions-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.7 Darwin/24.1.0

File hashes

Hashes for airfunctions-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1985aa8e71cd49d3b083569dc03a3b8589c7db4e348bb1ae303d838555415a3
MD5 ed26498a0e03481861f2ce4e6de7566a
BLAKE2b-256 24cb7090ee90fa9378350596e1f557a46e46e1a234299699ee170460a1314a61

See more details on using hashes here.

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