resonate-http-service-design-python

Design Python web framework routes that integrate with Resonate durable functions.

6|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-http-service-design-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resonate-http-service-design-python
Source: https://github.com/resonatehq/resonate-skills/tree/main/resonate-http-service-design-python
Command: npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-http-service-design-python

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Route handlers in Python web frameworks often need to trigger, await, or resolve long-running durable workflows without embedding business logic or external effects in ephemeral HTTP processes. This Skill clarifies where to place responsibilities (ephemeral routes vs durable workers), how to route RPC and runs to worker groups, and how to use webhooks and promises to bridge external systems and durable functions.

Core Features & Use Cases

  • Ephemeral route patterns: submit-and-poll, submit-and-callback (webhook resolves promise), and synchronous wrapping for fast workflows.
  • Worker separation and RPC: run durable functions in @resonate.register workers, route RPC to specialized worker groups, and keep external effects inside ctx.run.
  • Operational best practices: stable invocation IDs, use of options(target), explicit timeouts for synchronous RPC, and promise-based webhook resolution.
  • Use cases: order processing with approval callbacks, async job submission with polling endpoints, and short-running compute endpoints that block for quick results.

Quick Start

Create a FastAPI POST /orders endpoint that begins a Resonate durable workflow with a stable job_id and returns the job_id to the client.

Frequently Asked Questions about resonate-http-service-design-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate FastAPI route handlers with durable workflows?

FastAPI route handlers integrate with durable workflows by using Resonate client APIs like begin_run and rpc to trigger functions, keeping business logic in @resonate.register workers and external effects inside ctx.run. Handlers return job IDs or await quick results with explicit timeouts.

How do I handle webhook callbacks for asynchronous job processing in Python?

Webhook callbacks resolve durable workflow promises in Python by having the external system call an endpoint that executes promises.resolve. This bridges the external callback to the suspended durable function, allowing the workflow to resume without blocking the original HTTP request.

What is the best way to run synchronous blocking endpoints for quick compute tasks?

Synchronous blocking endpoints wrap quick durable workflows using rpc with explicit timeouts. This pattern blocks the HTTP request until the durable function completes, returning the result directly to the client if the computation finishes within the timeout limit.

Why should external effects be encapsulated inside ctx.run in durable functions?

External effects are encapsulated inside ctx.run in durable functions to ensure safe retries and state consistency. Combined with stable invocation IDs, this prevents duplicate side effects if the workflow is replayed after a failure.

Can I use Resonate durable functions with Flask or Django web frameworks?

Resonate durable functions work with Flask or Django by applying the same ephemeral route patterns. HTTP handlers use Resonate client APIs to start or resolve workflows, while durable logic remains isolated in registered worker functions.