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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for known_problems_fastapi_router-0.1.0.tar.gz
Algorithm Hash digest
SHA256 96d6895a9cd4eceb63f8076a498971cce7bf87d51ce4bf2bbb44ab2d694c5cdb
MD5 58b13bce4049b3f9b0b0b35a2f776f77
BLAKE2b-256 6b2e450cf5450962b79d487396b91254ade23b8b02464b6273e469267536c26c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for known_problems_fastapi_router-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4db816b5b917068b5ba9033a9be808dc064c3bcbf72ef87de6f251331cc50d6e
MD5 cedb009d08a6fcc88720276cadfb4150
BLAKE2b-256 424c93e5673664bee5ab6127e07e54a8539aad66211df2560065cc269ae84117

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