Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Lange (0.14 sec)

  1. docs_src/custom_response/tutorial007.py

    from fastapi import FastAPI
    from fastapi.responses import StreamingResponse
    
    app = FastAPI()
    
    
    async def fake_video_streamer():
        for i in range(10):
            yield b"some fake video bytes"
    
    
    @app.get("/")
    async def main():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 277 bytes
    - Viewed (0)
  2. tests/test_additional_responses_router.py

    @router.get(
        "/b",
        responses={
            502: {"description": "Error 2"},
            "4XX": {"description": "Error with range, upper"},
        },
    )
    async def b():
        return "b"
    
    
    @router.get(
        "/c",
        responses={
            "400": {"description": "Error with str"},
            "5xx": {"description": "Error with range, lower"},
            "default": {"description": "A default response"},
        },
    )
    async def c():
        return "c"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 5.1K bytes
    - Viewed (0)
Back to top