Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 109 for listo (0.12 sec)

  1. docs/en/docs/tutorial/query-params-str-validations.md

    ```
    
    the default of `q` will be: `["foo", "bar"]` and your response will be:
    
    ```JSON
    {
      "q": [
        "foo",
        "bar"
      ]
    }
    ```
    
    #### Using `list`
    
    You can also use `list` directly instead of `List[str]` (or `list[str]` in Python 3.9+):
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/query_params_str_validations/tutorial013_an_py39.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  2. docs/pt/docs/learn/index.md

    # Aprender
    
    Nesta parte da documentação encontramos as seções introdutórias e os tutoriais para aprendermos como usar o **FastAPI**.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 04 14:20:02 GMT 2024
    - 261 bytes
    - Viewed (0)
  3. docs_src/query_params_str_validations/tutorial013_an.py

    from fastapi import FastAPI, Query
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[list, Query()] = []):
        query_items = {"q": q}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 220 bytes
    - Viewed (0)
  4. docs_src/header_params/tutorial003_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Header
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(x_token: Annotated[list[str] | None, Header()] = None):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 221 bytes
    - Viewed (0)
  5. docs_src/query_params_str_validations/tutorial011_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[list[str], None], Query()] = None):
        query_items = {"q": q}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 237 bytes
    - Viewed (0)
  6. docs_src/body_nested_models/tutorial002_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: list[str] = []
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 369 bytes
    - Viewed (0)
  7. docs_src/body_nested_models/tutorial002_py39.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: list[str] = []
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 407 bytes
    - Viewed (0)
  8. docs_src/generate_clients/tutorial001_py39.py

        message: str
    
    
    @app.post("/items/", response_model=ResponseMessage)
    async def create_item(item: Item):
        return {"message": "item received"}
    
    
    @app.get("/items/", response_model=list[Item])
    async def get_items():
        return [
            {"name": "Plumbus", "price": 3},
            {"name": "Portal Gun", "price": 9001},
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 494 bytes
    - Viewed (0)
  9. docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    もしくは、依存関係が値を返さない場合もあります。
    
    しかし、それでも実行・解決する必要があります。
    
    このような場合、*path operation関数*のパラメータを`Depends`で宣言する代わりに、*path operation decorator*に`dependencies`の`list`を追加することができます。
    
    ##  *path operationデコレータ*への`dependencies`の追加
    
    *path operationデコレータ*はオプショナルの引数`dependencies`を受け取ります。
    
    それは`Depends()`の`list`であるべきです:
    
    ```Python hl_lines="17"
    {!../../../docs_src/dependencies/tutorial006.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 15 16:44:28 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    In diesen Fällen können Sie, anstatt einen Parameter der *Pfadoperation-Funktion* mit `Depends` zu deklarieren, eine `list`e von `dependencies` zum *Pfadoperation-Dekorator* hinzufügen.
    
    ## `dependencies` zum *Pfadoperation-Dekorator* hinzufügen
    
    Der *Pfadoperation-Dekorator* erhält ein optionales Argument `dependencies`.
    
    Es sollte eine `list`e von `Depends()` sein:
    
    === "Python 3.9+"
    
        ```Python hl_lines="19"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:09:16 GMT 2024
    - 4.7K bytes
    - Viewed (0)
Back to top