Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 401 - 410 of 630 for asyncId (0.05 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs_src/query_params_str_validations/tutorial011_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[list[str] | None, Query()] = None):
        query_items = {"q": q}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 224 bytes
    - Click Count (0)
  2. docs_src/body_nested_models/tutorial008_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    @app.post("/images/multiple/")
    async def create_multiple_images(images: list[Image]):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 248 bytes
    - Click Count (0)
  3. docs/ja/docs/advanced/events.md

    ```Python
    with open("file.txt") as file:
        file.read()
    ```
    
    最近の Python には「非同期コンテキストマネージャ」もあります。`async with` で使います:
    
    ```Python
    async with lifespan(app):
        await do_stuff()
    ```
    
    このようにコンテキストマネージャ(または非同期コンテキストマネージャ)を作ると、`with` ブロックに入る前に `yield` より前のコードが実行され、`with` ブロックを出た後に `yield` より後ろのコードが実行されます。
    
    上のコード例では直接それを使ってはいませんが、FastAPI に渡して内部で使ってもらいます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 9.9K bytes
    - Click Count (0)
  4. docs/ko/docs/tutorial/testing.md

    **FastAPI**는 개발자의 편의를 위해 `starlette.testclient`를 `fastapi.testclient`로도 제공할 뿐입니다. 하지만 이는 Starlette에서 직접 가져옵니다.
    
    ///
    
    /// tip | 팁
    
    FastAPI 애플리케이션에 요청을 보내는 것 외에도 테스트에서 `async` 함수를 호출하고 싶다면 (예: 비동기 데이터베이스 함수), 심화 튜토리얼의 [비동기 테스트](../advanced/async-tests.md)를 참조하세요.
    
    ///
    
    ## 테스트 분리하기 { #separating-tests }
    
    실제 애플리케이션에서는 테스트를 별도의 파일로 나누는 경우가 많습니다.
    
    그리고 **FastAPI** 애플리케이션도 여러 파일이나 모듈 등으로 구성될 수 있습니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 6.8K bytes
    - Click Count (0)
  5. docs_src/additional_responses/tutorial003_py310.py

                "content": {
                    "application/json": {
                        "example": {"id": "bar", "value": "The bar tenders"}
                    }
                },
            },
        },
    )
    async def read_item(item_id: str):
        if item_id == "foo":
            return {"id": "foo", "value": "there goes my hero"}
        else:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 837 bytes
    - Click Count (0)
  6. docs_src/extra_models/tutorial001_py310.py

        user_in_db = UserInDB(**user_in.model_dump(), hashed_password=hashed_password)
        print("User saved! ..not really")
        return user_in_db
    
    
    @app.post("/user/", response_model=UserOut)
    async def create_user(user_in: UserIn):
        user_saved = fake_save_user(user_in)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 905 bytes
    - Click Count (0)
  7. docs_src/path_operation_advanced_configuration/tutorial004_py310.py

    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: set[str] = set()
    
    
    @app.post("/items/", summary="Create an item")
    async def create_item(item: Item) -> Item:
        """
        Create an item with all the information:
    
        - **name**: each item must have a name
        - **description**: a long description
        - **price**: required
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 04 12:07:26 GMT 2026
    - 661 bytes
    - Click Count (0)
  8. docs_src/server_sent_events/tutorial004_py310.py

    
    items = [
        Item(name="Plumbus", price=32.99),
        Item(name="Portal Gun", price=999.99),
        Item(name="Meeseeks Box", price=49.99),
    ]
    
    
    @app.get("/items/stream", response_class=EventSourceResponse)
    async def stream_items(
        last_event_id: Annotated[int | None, Header()] = None,
    ) -> AsyncIterable[ServerSentEvent]:
        start = last_event_id + 1 if last_event_id is not None else 0
        for i, item in enumerate(items):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 09:21:52 GMT 2026
    - 795 bytes
    - Click Count (0)
  9. docs/pt/docs/tutorial/stream-json-lines.md

    ///
    
    ### Funções de operação de rota não assíncronas { #non-async-path-operation-functions }
    
    Você também pode usar funções `def` normais (sem `async`) e usar `yield` da mesma forma.
    
    O FastAPI garantirá que sejam executadas corretamente para não bloquear o event loop.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:13 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  10. docs_src/query_params_str_validations/tutorial003_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str | None = Query(default=None, min_length=3, max_length=50)):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 290 bytes
    - Click Count (0)
Back to Top