Griffe FastAPI Extension
This extension will search for functions that are decorated with an APIRouter and adds the following extra fields to a function:
- api: the path of the api
- method: the HTTP method
- responses: A dictionary with the responses
These 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.
A fastapi template is used 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
Configuration
- paths select only apply griffe-fastapi for the given paths
- generate_table Add a table in the docstring with the http response codes (default=True)
Metadata
Release files for griffe-fastapi 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| griffe_fastapi-0.1.6.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| griffe_fastapi-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.8 kB
Release files / griffe_fastapi-0.1.6.tar.gz
| Download URL | griffe_fastapi-0.1.6.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b8525d51a8bc0340b88b3fde5f83d1192eacfb21a8ed2b71dd6f53edc352b21
|
|
BLAKE2b-256 checksum How to use checksums |
b1bf64d826105dc4b49c608ea27681af7be8c8fd8d94df3143727046461e6f84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.0 CPython/3.10.12 Linux/6.8.0-90-generic
|
Release files / griffe_fastapi-0.1.6-py3-none-any.whl
| Download URL | griffe_fastapi-0.1.6-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f163fd64e266520f0f34a09419b5977d6716467bdac5854fa69e28aa6745428
|
|
BLAKE2b-256 checksum How to use checksums |
0c00fadd215815365699e71effda1850b06de186486091dbd9b7cce5f25b7831
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.0 CPython/3.10.12 Linux/6.8.0-90-generic
|