Skip to content
masterclass Buddy

FastAPI · Decorator

@app.put

@app.put(path) maps a Python function to PUT requests for a URL path. FastAPI calls the function for matching requests and converts supported return values into the response.

Last updated

Syntax

@app.put(path, name=None, *, dependencies=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • FastAPI
  • @app.get
  • @app.post
  • @app.delete
  • @app.patch
  • response_model
  • OpenAPI
  • Pydantic models

Source: FastAPI class - FastAPI. Checked 2026-11-03.