Skip to main content

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)

Source distribution for griffe-fastapi 0.1.6
File Size Uploaded
griffe_fastapi-0.1.6.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for griffe-fastapi 0.1.6
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page