Skip to content

AstraZeneca/runnable

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 (2 lines):

from runnable import PythonJob
PythonJob(function=analyze_sales).execute()

🎉 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
Pipeline(steps=[
    PythonTask(function=load_customer_data, returns=["customer_data"]),
    PythonTask(function=analyze_segments, returns=["analysis"])
]).execute()

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

⚡ Installation

pip install runnable

📊 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.


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