FuncToWeb 2.0 documentation

July 29, 2026 · View on GitHub

Technical reference for the project. For an overview, see the README; for hands-on use, see examples/, one capability per file.

Start here

  • Getting started — install, write your first function and run it.
  • run() — the standalone application and the space index.
  • router_of() — mounting the router in an existing FastAPI host application.

Inputs and forms

  • Types and validation — constraints, dataclasses, lists, unions, optionals and defaults.
  • Prefill and hidden parameters — open a form with initial values, from Python or from the URL.
  • Files — uploads, reusable file references and the size limit.
  • WebFunction — the name, description and slug of a function; prepared spaces.

Execution and results

  • Execution over HTTP/invoke, the request body, the envelope and the status codes.
  • Streaming/invoke-stream, SSE events and print() capture.
  • Outputs — text, images, tables and downloads with Download.
  • OpenForm — open another function's form with the return value as prefill.

Integration

  • /doc — the published contract that a client or an agent consumes.
  • sdk.js — the helpers that call a space from your own frontend, and how to embed a function's page in another site.
  • Static assets/static, the icons, the theme and how they are cached.
  • Security — what FuncToWeb covers and what belongs to the host application.

Internals

Design notes

The pages above say what each thing is: the signature, the values, the errors and one example. The reasoning behind each of those decisions lives apart, in design/ — for whoever contributes to FuncToWeb, and for the curious. Nothing there is needed in order to use the library.