Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers FastAPI

How to build and deploy Python-based APIs on Cloudflare Workers using the FastAPI framework and the built-in ASGI server.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers FastAPI

How to build and deploy Python-based APIs on Cloudflare Workers using the FastAPI framework and the built-in ASGI server.

When To Use

Use when you need to implement a Python-based web API on Cloudflare Workers using the FastAPI framework and ASGI protocol.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-python-packages-fastapi-workflow-guide.mdA guide explaining how to use the FastAPI package within Cloudflare Workers using the ASGI protocol.Questions about a guide explaining how to use the FastAPI package within Cloudflare Workers using the ASGI protocol.
examples/workers-python-packages-fastapi-cloudflare-workers-fastapi-python.textA Python example demonstrating how to deploy and run a FastAPI application on Cloudflare Workers using uv and pywrangler.Exact payloads, commands, or snippets shown in A Python example demonstrating how to deploy and run a FastAPI application on Cloudflare Workers using uv and pywrang...
examples/workers-python-packages-fastapi-cloudflare-workers-fastapi-python-entryp.textA Python code example demonstrating how to implement a FastAPI application within a Cloudflare Workers environment using the WorkerEntrypoint class.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to implement a FastAPI application within a Cloudflare Workers environment us...

What This Skill Covers

  • The FastAPI package is supported in Python Workers.
  • Main sections: Get Started, Example code.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/languages/python/packages/fastapi