FastAPI Known Problems API router
Override the FastAPI APIRouter to handle endpoints' known problems at router level. For known problems a response following the RFC 7807 is be returned.
Examples
To run the examples, execute the uvicorn command from the examples directory of the project.
e.g. known-problems-fastapi-router/examples$
uvicorn basic_usage.web:app --host 0.0.0.0 --port 8000
After running the example code through the CLI three example documentations will be available at the following URLs:
-
Swagger: http://0.0.0.0:8000/docs
-
Redoc: http://0.0.0.0:8000/redoc
-
RapiDoc: http://0.0.0.0:8000/rapidoc
FastAPI validation error
FastAPI Validation Error has to be handled by the FastAPI exception handler middleware.
@app.exception_handler(RequestValidationError)
build_validation_error_exception_handler("example.com")
Release files for known-problems-fastapi-router 0.111.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| known_problems_fastapi_router-0.111.0.tar.gz | 11.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| known_problems_fastapi_router-0.111.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / known_problems_fastapi_router-0.111.0.tar.gz
| Download URL | known_problems_fastapi_router-0.111.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5372cf8029b48408dae6dc1d7b91a86723cfdcc3e16b4dac36abaa78291ec515
|
|
BLAKE2b-256 checksum How to use checksums |
93d4d70ad788cc4962c3c9d27f25c08048fd7cc8e8d8e5b51c5fcd64197c9bf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / known_problems_fastapi_router-0.111.0-py3-none-any.whl
| Download URL | known_problems_fastapi_router-0.111.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81427e5b99e9196096f5d19afca15c292d47210f1acacd799d9226d591dbd743
|
|
BLAKE2b-256 checksum How to use checksums |
eeb2351dcd9fe1a986d2fa74fc88cd7a20ec107e2c5b0273f0ef7e85869804ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|