Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 56 for 500 (0.16 sec)

  1. tests/test_additional_responses_response_class.py

    class JsonApiError(BaseModel):
        errors: typing.List[Error]
    
    
    @app.get(
        "/a",
        response_class=JsonApiResponse,
        responses={500: {"description": "Error", "model": JsonApiError}},
    )
    async def a():
        pass  # pragma: no cover
    
    
    @app.get("/b", responses={500: {"description": "Error", "model": Error}})
    async def b():
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial008d.py

        from docs_src.dependencies.tutorial008d import app
    
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/items/portal-gun")
        assert response.status_code == 500, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  3. tests/test_response_model_invalid.py

            app = FastAPI()
    
            @app.get("/", responses={"500": {"model": NonPydanticModel}})
            def read_root():
                pass  # pragma: nocover
    
    
    def test_invalid_response_model_sub_type_in_responses_raises():
        with pytest.raises(FastAPIError):
            app = FastAPI()
    
            @app.get("/", responses={"500": {"model": List[NonPydanticModel]}})
            def read_root():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 29 13:04:35 GMT 2020
    - 1.1K bytes
    - Viewed (0)
  4. tests/test_response_code_no_body.py

        status: str
        title: str
    
    
    class JsonApiError(BaseModel):
        errors: typing.List[Error]
    
    
    @app.get(
        "/a",
        status_code=204,
        response_class=JsonApiResponse,
        responses={500: {"description": "Error", "model": JsonApiError}},
    )
    async def a():
        pass
    
    
    @app.get("/b", responses={204: {"description": "No Content"}})
    async def b():
        pass  # pragma: no cover
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  5. tests/test_include_router_defaults_overrides.py

    async def callback5(level5: str):
        pass  # pragma: nocover
    
    
    app = FastAPI(
        dependencies=[Depends(dep0)],
        responses={
            400: {"description": "Client error level 0"},
            500: {"description": "Server error level 0"},
        },
        default_response_class=ResponseLevel0,
        callbacks=callback_router0.routes,
    )
    
    router2_override = APIRouter(
        prefix="/level2",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 358.6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dependencies/test_tutorial008d_an.py

        from docs_src.dependencies.tutorial008d_an import app
    
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/items/portal-gun")
        assert response.status_code == 500, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  7. docs/en/docs/img/deployment/https/https01.drawio

                        </mxGeometry>
                    </mxCell>
                    <mxCell id="33" value="" style="group" parent="1" vertex="1" connectable="0">
                        <mxGeometry x="-140" y="-75" width="500" height="350" as="geometry"/>
                    </mxCell>
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 6.2K bytes
    - Viewed (0)
  8. docs/en/docs/img/deployment/https/https04.drawio

                        </mxGeometry>
                    </mxCell>
                    <mxCell id="33" value="" style="group" parent="1" vertex="1" connectable="0">
                        <mxGeometry x="-140" y="-75" width="500" height="350" as="geometry"/>
                    </mxCell>
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 14K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/middleware.md

    ```Python hl_lines="2  6"
    {!../../../docs_src/advanced_middleware/tutorial003.py!}
    ```
    
    The following arguments are supported:
    
    * `minimum_size` - Do not GZip responses that are smaller than this minimum size in bytes. Defaults to `500`.
    
    ## Other middlewares
    
    There are many other ASGI middlewares.
    
    For example:
    
    * <a href="https://docs.sentry.io/platforms/python/guides/fastapi/" class="external-link" target="_blank">Sentry</a>
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 10 18:27:10 GMT 2023
    - 4K bytes
    - Viewed (0)
  10. docs/en/docs/img/deployment/https/https02.drawio

                        </mxGeometry>
                    </mxCell>
                    <mxCell id="33" value="" style="group" parent="1" vertex="1" connectable="0">
                        <mxGeometry x="-140" y="-75" width="500" height="350" as="geometry"/>
                    </mxCell>
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 9.4K bytes
    - Viewed (0)
Back to top