Skip to content

AstraZeneca/runnable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Runnable

Runnable

Transform any Python function into a portable, trackable pipeline in seconds.

python: Pypi License Code style: black MyPy Checked Tests:


πŸš€ 30-Second Transformation

Your existing function (unchanged!):

def analyze_sales(): total_revenue = 50000 best_product = "widgets" return total_revenue, best_product

Make it runnable everywhere:

from runnable import PythonJob def main(): PythonJob(function=analyze_sales).execute() if __name__ == "__main__": main()

πŸŽ‰ Success! Your function now runs the same on laptop, containers, and Kubernetes with automatic tracking and reproducibility.

πŸ”— Chain Functions Without Glue Code

def load_customer_data(): return {"count": 1500, "segments": ["premium", "standard"]} def analyze_segments(customer_data): # Name matches = automatic connection return {"premium_pct": 30, "growth_potential": "high"} # What Runnable needs (same logic, no glue): from runnable import Pipeline, PythonTask def main(): Pipeline(steps=[ PythonTask(function=load_customer_data, returns=["customer_data"]), PythonTask(function=analyze_segments, returns=["analysis"]) ]).execute() if __name__ == "__main__": main()

Same pipeline runs unchanged on laptop, containers, and Kubernetes.

⚑ Installation

pip install runnable

For development:

uv sync --all-extras --dev

Run examples:

uv run examples/01-tasks/python_tasks.py

πŸ“Š Why Choose Runnable?

  • 🎯 Easy to adopt: Your code remains as-is, no decorators or imposed structure
  • πŸ—οΈ Bring your infrastructure: Works with your platforms, not a replacement
  • πŸ“ Reproducibility: Automatic tracking without additional code
  • πŸ” Retry failures: Debug anywhere, retry from failure points
  • πŸ§ͺ Testing: Mock/patch pipeline steps, test functions normally
  • πŸ’” Move on: Easy removal - just delete runnable files, your code stays

πŸ“– Documentation

Complete Documentation β†’

πŸ”€ Pipeline Types

Linear Pipelines

Simple sequential execution of Python functions, notebooks, or shell scripts.

Parallel Branches

Execute multiple branches simultaneously for improved performance.

Map Patterns

Execute pipelines over iterable parameters for batch processing.

Arbitrary Nesting

Combine parallel, map, and sequential patterns as needed.

πŸ†š Why Choose Runnable?

Runnable Kedro Metaflow Airflow
Zero Code Changes βœ… Wrap existing functions ❌ Restructure to nodes ❌ Convert to FlowSpec ❌ Rewrite as DAG tasks
Environment Portability Same code: laptop→container→K8s→Argo Deployment-specific configs AWS-focused with --with flags Platform-specific operators
Mixed Task Types Python + Notebooks + Shell Python nodes only Python steps only Requires separate operators
Plugin Extensibility Auto-discovery via entry points kedro-* packages Limited extensions Complex plugin development
Parameter Passing Automatic by name matching Manual catalog definitions Flow state management Manual XCom operations

πŸš€ Time to Value

Runnable:

pip install runnable # Wrap your existing function - done!

Others:

  • Learn framework conventions
  • Restructure existing code
  • Configure project structure
  • Set up deployment configs

Ready to get started? Check out our 30-second demo for immediate results!

About

Runnable

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •