frameworks/motia/motia-py/README.md
This directory contains Python packages for the III Engine.
# 1) Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate
# 2) Create requirements.txt
cat > requirements.txt << 'EOF'
motia
iii-sdk==0.2.0
EOF
# 3) Install dependencies
pip install -r requirements.txt
# 4) Create steps folder and a *_steps.py file
mkdir -p steps
cat > steps/single_event_steps.py << 'EOF'
from typing import Any
from motia import FlowContext, queue
config = {
"name": "SingleEventTrigger",
"description": "Test single event trigger",
"triggers": [queue("test.event")],
"enqueues": ["test.processed"],
}
async def handler(input: Any, ctx: FlowContext[Any]) -> None:
ctx.logger.info("Single event trigger fired", {"data": input})
EOF
# 5) Run Motia (inside the active venv)
motia run
In another terminal, start III:
iii
The core SDK for communicating with the III Engine via WebSocket.
cd iii
uv pip install -e .
High-level framework for building workflows with the III Engine.
cd motia
uv pip install -e .
Basic example demonstrating the III SDK.
cd iii-example
uv pip install -e ../iii
python src/main.py
Example demonstrating the Motia framework with a Todo application.
cd motia-example
uv pip install -e ../iii -e ../motia
motia run --dir steps
uv pip install -e iii -e motia
cd packages/motia
uv sync --extra dev
uv run pytest -m "not integration"
uv run pytest -m "not integration" --cov=src/motia --cov-report=term-missing
cd iii && mypy src
cd motia && mypy src
cd iii && ruff check src
cd motia && ruff check src