Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fbraem/griffe-fastapi
Griffe extension for FastAPI
https://github.com/fbraem/griffe-fastapi
fastapi griffe-extension mkdocs mkdocstrings
Last synced: about 2 months ago
JSON representation
Griffe extension for FastAPI
- Host: GitHub
- URL: https://github.com/fbraem/griffe-fastapi
- Owner: fbraem
- License: mit
- Created: 2024-11-15T18:48:55.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-11-16T17:09:46.000Z (about 2 months ago)
- Last Synced: 2024-11-16T17:26:16.707Z (about 2 months ago)
- Topics: fastapi, griffe-extension, mkdocs, mkdocstrings
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Griffe FastAPI Extension
========================This extension will search for functions that are decorated with an APIRouter and adds the following extra
fields to a function:+ method: the HTTP method
+ responses: A dictionary with the responsesThese fields are stored in the extra property of the function. The extra property is a dictionary and `griffe_fastapi`
is the key for the fields of this extension.Create a custom function template to handle these extra fields in your documentation.
Installation
------------````
pip install griffe-fastapi
````or with poetry:
````
poetry add griffe-fastapi -G docs
````When you use a group, like above, you also need to install it:
````
poetry install -G docs
````MkDocs
------````
plugins:
- mkdocstrings:
handlers:
python:
options:
extensions:
- griffe_fastapi
````