Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 369 for kAsync (0.38 sec)

  1. docs_src/custom_response/tutorial006c.py

    from fastapi import FastAPI
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/pydantic", response_class=RedirectResponse, status_code=302)
    async def redirect_pydantic():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 237 bytes
    - Viewed (0)
  2. docs_src/header_params/tutorial002.py

    from typing import Union
    
    from fastapi import FastAPI, Header
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        strange_header: Union[str, None] = Header(default=None, convert_underscores=False),
    ):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 260 bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/dependencies/index.md

    ## `async`하게, 혹은 `async`하지 않게
    
    의존성이 (*경로 작동 함수*에서 처럼 똑같이) **FastAPI**에 의해 호출될 수 있으며, 함수를 정의할 때 동일한 규칙이 적용됩니다.
    
    `async def`을 사용하거나 혹은 일반적인 `def`를 사용할 수 있습니다.
    
    그리고 일반적인 `def` *경로 작동 함수* 안에 `async def`로 의존성을 선언할 수 있으며, `async def` *경로 작동 함수* 안에 `def`로 의존성을 선언하는 등의 방법이 있습니다.
    
    아무 문제 없습니다. **FastAPI**는 무엇을 할지 알고 있습니다.
    
    !!! note "참고"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  4. docs_src/query_params_str_validations/tutorial014_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        hidden_query: str | None = Query(default=None, include_in_schema=False),
    ):
        if hidden_query:
            return {"hidden_query": hidden_query}
        else:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 298 bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial005_an.py

        q: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[Union[str, None], Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(
        query_or_default: Annotated[str, Depends(query_or_cookie_extractor)],
    ):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 558 bytes
    - Viewed (0)
  6. docs_src/query_params_str_validations/tutorial014_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        hidden_query: Annotated[str | None, Query(include_in_schema=False)] = None,
    ):
        if hidden_query:
            return {"hidden_query": hidden_query}
        else:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 331 bytes
    - Viewed (0)
  7. docs_src/query_params_str_validations/tutorial014.py

    from typing import Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        hidden_query: Union[str, None] = Query(default=None, include_in_schema=False),
    ):
        if hidden_query:
            return {"hidden_query": hidden_query}
        else:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 330 bytes
    - Viewed (0)
  8. docs_src/extra_data_types/tutorial001.py

    from datetime import datetime, time, timedelta
    from typing import Union
    from uuid import UUID
    
    from fastapi import Body, FastAPI
    
    app = FastAPI()
    
    
    @app.put("/items/{item_id}")
    async def read_items(
        item_id: UUID,
        start_datetime: datetime = Body(),
        end_datetime: datetime = Body(),
        process_after: timedelta = Body(),
        repeat_at: Union[time, None] = Body(default=None),
    ):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Apr 19 00:11:40 UTC 2024
    - 755 bytes
    - Viewed (0)
  9. docs_src/query_params_str_validations/tutorial003_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[Union[str, None], Query(min_length=3, max_length=50)] = None,
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 343 bytes
    - Viewed (0)
  10. docs_src/query_params_str_validations/tutorial014_an.py

    from typing import Union
    
    from fastapi import FastAPI, Query
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        hidden_query: Annotated[Union[str, None], Query(include_in_schema=False)] = None,
    ):
        if hidden_query:
            return {"hidden_query": hidden_query}
        else:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 373 bytes
    - Viewed (0)
Back to top