Skip to main content

A known problem API router package

Project description

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:

FastAPI validation error

FastAPI Validation Error has to be handled by the FastAPI exception handler middleware.

@app.exception_handler(RequestValidationError)
    async def custom_exception_handler(
            request: Request, exc: RequestValidationError
    ):
        return standard_validation_exception_handler(request, exc)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

known_problems_fastapi_router-0.1.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file known_problems_fastapi_router-0.1.2.tar.gz.

File metadata

File hashes

Hashes for known_problems_fastapi_router-0.1.2.tar.gz
Algorithm Hash digest
SHA256 62f4908a718fa4b2f595469109721c62381b4c9aa472b6556dd3be61ac1297fc
MD5 0ae0557e868169052b6feea54609b11b
BLAKE2b-256 da796a0d9634518ebbe1a43251eac1873fcfaee4c53112c1bdad8145fb8a7ed7

See more details on using hashes here.

File details

Details for the file known_problems_fastapi_router-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for known_problems_fastapi_router-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4917b9b1dd08116def5e4e4a64081d163e9d682bfa6d51796bfd602e1bd95f51
MD5 95140ce914fc01b506413948f2475e25
BLAKE2b-256 d91b843acf44a41dafd2e7a200ad98ef75692795db05f88f3014d42a0040d19f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page