Files
motia/steps/hello_step.py
2025-10-19 14:57:07 +00:00

12 lines
335 B
Python

config = {
"name": "HelloWorld",
"type": "api",
"path": "/hello",
"method": "GET",
"emits": ["hello.triggered"]
}
async def handler(req, context):
await context.emit({"topic": "hello.triggered", "data": {"message": "Event from API"}})
return {"status": 200, "body": {"message": "Hello World from Motia!"}}