LibraryActive

FastAPI APIRouter

APIRouter class used to group path operations and structure a FastAPI app across multiple files.

Open source page

Product features

Product features

Dependencies

List of dependencies using Depends() applied to all path operations in the router.

Example ¶

FastAPI Conf ¶

FastAPI mini documentary ¶

FastAPI ¶

Gold Sponsors ¶

HTTP method decorators

Decorators get, put, post, delete, options, head, patch, trace and websocket.

include_router

Method used to include the router in the FastAPI app or in another APIRouter.

Installation ¶

Keystone Sponsor ¶

Opinions ¶

Path prefix

Optional path prefix applied to all path operations in the router.

Requirements ¶

Silver Sponsors ¶

Sponsors ¶

Tags

List of tags applied to all path operations and added to the generated OpenAPI.

Typer , the FastAPI of CLIs ¶