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.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for known_problems_fastapi_router-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dfd2ca79508fd461be0137a56047396fc76894425a0cfee03f3e2e3a063fb005
MD5 c245ad588872dbe8355f93095ec78450
BLAKE2b-256 9968f565fcea712a4db87ea876ad7e7060fa3a46f37e396b4987fd6234cd4a58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for known_problems_fastapi_router-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 101319c31b987367069b1b3d9a480e50902a428c38477f9056480100a5495a56
MD5 efcda2893ca5bb159c22564a300425ed
BLAKE2b-256 8c502b82302c9ccc9686b1a16d6742f1eed1ac100df75f83962014fcb0a3a91d

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