frameworks/motia/motia-py/playground/README.md
This example demonstrates the Motia framework with a Todo application workflow.
curl -LsSf https://astral.sh/uv/install.sh | sh
cd playground
uv sync --all-extras
uv run motia run --dir steps
playground/
├── pyproject.toml # Project configuration with dependencies
├── uv.lock # Locked dependency versions
├── README.md # This file
└── steps/ # Example workflows and triggers
├── __init__.py
├── api_steps/ # HTTP API examples (SSE + HTTP channels)
├── conditions/ # Conditional trigger examples
├── greetings/ # API CRUD + summary flow examples
├── multi_trigger/ # Single/multi trigger examples (API/Event/Cron)
├── otel_example/ # OpenTelemetry instrumentation example
├── state_example/ # State update + state-change listener examples
├── stream_example/ # Stream-based todo event example
└── todo/ # Todo CRUD workflow examples
This example showcases Motia's event-driven workflow capabilities with a simple Todo application:
todo.created, todo.updated, todo.deletedThe steps/api_steps/http_channel_echo_step.py step demonstrates channel-based
HTTP handling with MotiaHttpArgs:
request.request_body.streamresponse.writer.streamTry it with:
curl -X POST http://localhost:3000/http-channel/echo \
-H "content-type: application/json" \
-d '{"message":"hello channel","items":[1,2,3]}'
For more information on the Motia framework, see: