Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 535 for next (0.14 sec)

  1. tests/test_ws_router.py

        await websocket.send_text(pathparam)
        await websocket.send_text(queryparam)
        await websocket.close()
    
    
    async def ws_dependency():
        return "Socket Dependency"
    
    
    @router.websocket("/router-ws-depends/")
    async def router_ws_decorator_depends(
        websocket: WebSocket, data=Depends(ws_dependency)
    ):
        await websocket.accept()
        await websocket.send_text(data)
        await websocket.close()
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. tests/test_dependency_contextvars.py

        yield request_state
        legacy_request_state_context_var.reset(contextvar_token)
    
    
    @app.middleware("http")
    async def custom_middleware(
        request: Request, call_next: Callable[[Request], Awaitable[Response]]
    ):
        response = await call_next(request)
        response.headers["custom"] = "foo"
        return response
    
    
    @app.get("/user", dependencies=[Depends(set_up_request_state_dependency)])
    def get_user():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_dataclasses/test_tutorial002.py

            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/next": {
                    "get": {
                        "summary": "Read Next Item",
                        "operationId": "read_next_item_items_next_get",
                        "responses": {
                            "200": {
                                "description": "Successful Response",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  4. docs/en/docs/deployment/concepts.md

    I'll show you some concrete examples in the next chapters.
    
    ---
    
    Then the next concepts to consider are all about the program running your actual API (e.g. Uvicorn).
    
    ## Program and Process
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18K bytes
    - Viewed (0)
  5. docs_src/custom_docs_ui/tutorial001.py

    
    @app.get("/redoc", include_in_schema=False)
    async def redoc_html():
        return get_redoc_html(
            openapi_url=app.openapi_url,
            title=app.title + " - ReDoc",
            redoc_js_url="https://unpkg.com/redoc@next/bundles/redoc.standalone.js",
        )
    
    
    @app.get("/users/{username}")
    async def read_user(username: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Oct 30 09:58:58 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  6. docs/en/docs/deployment/https.md

    # About HTTPS
    
    It is easy to assume that HTTPS is something that is just "enabled" or not.
    
    But it is way more complex than that.
    
    !!! tip
        If you are in a hurry or don't care, continue with the next sections for step by step instructions to set everything up with different techniques.
    
    To **learn the basics of HTTPS**, from a consumer perspective, check <a href="https://howhttps.works/" class="external-link" target="_blank">https://howhttps.works/</a>.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 12K bytes
    - Viewed (0)
  7. docs_src/middleware/tutorial001.py

    import time
    
    from fastapi import FastAPI, Request
    
    app = FastAPI()
    
    
    @app.middleware("http")
    async def add_process_time_header(request: Request, call_next):
        start_time = time.time()
        response = await call_next(request)
        process_time = time.time() - start_time
        response.headers["X-Process-Time"] = str(process_time)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 349 bytes
    - Viewed (0)
  8. docs/en/docs/advanced/security/index.md

    !!! tip
        The next sections are **not necessarily "advanced"**.
    
        And it's possible that for your use case, the solution is in one of them.
    
    ## Read the Tutorial first
    
    The next sections assume you already read the main [Tutorial - User Guide: Security](../../tutorial/security/index.md){.internal-link target=_blank}.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 633 bytes
    - Viewed (0)
  9. docs/ko/docs/tutorial/middleware.md

        만약 (나중에 문서에서 다룰) 백그라운드 작업이 있다면, 모든 미들웨어가 실행되고 *난 후에* 실행됩니다.
    
    ## 미들웨어 만들기
    
    미들웨어를 작성하기 위해서 함수 상단에 `@app.middleware("http")` 데코레이터를 사용할 수 있습니다.
    
    미들웨어 함수는 다음 항목들을 받습니다:
    
    * `request`.
    * `request`를 매개변수로 받는 `call_next` 함수.
        * 이 함수는 `request`를 해당하는 *경로 작업*으로 전달합니다.
        * 그런 다음, *경로 작업*에 의해 생성된 `response` 를 반환합니다.
    * `response`를 반환하기 전에 추가로 `response`를 수정할 수 있습니다.
    
    ```Python hl_lines="8-9  11  14"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Jan 31 14:35:27 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  10. docs/en/docs/deployment/index.md

    main concepts you should probably keep in mind when deploying a **FastAPI** application (although most of it applies to any other type of web application).
    
    You will see more details to keep in mind and some of the techniques to do it in the next sections. ✨...
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 1.2K bytes
    - Viewed (0)
Back to top