Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 913 for annotated (0.43 sec)

  1. docs_src/settings/app02_an_py39/main.py

    from functools import lru_cache
    from typing import Annotated
    
    from fastapi import Depends, FastAPI
    
    from .config import Settings
    
    app = FastAPI()
    
    
    @lru_cache
    def get_settings():
        return Settings()
    
    
    @app.get("/info")
    async def info(settings: Annotated[Settings, Depends(get_settings)]):
        return {
            "app_name": settings.app_name,
            "admin_email": settings.admin_email,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 445 bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/body-multiple-params.md

        ```
    
    === "Python 3.10+ nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="17-19"
        {!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+ nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="19-21"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Jan 29 17:32:43 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  3. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/inspect/ManagedModelInitializerTest.groovy

    Its property 'java.io.FileInputStream stream' can not be constructed
    It must be one of:
        - A managed type (annotated with @Managed)
        - A managed collection. A valid managed collection takes the form of ModelSet<T> or ModelMap<T> where 'T' is:
            - A managed type (annotated with @Managed)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 12.9K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/request-forms-and-files.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="1"
        {!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="1"
        {!> ../../../docs_src/request_forms_and_files/tutorial001.py!}
        ```
    
    ## Define `File` and `Form` parameters
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:02:19 UTC 2024
    - 2K bytes
    - Viewed (0)
  5. docs_src/app_testing/app_b_an_py310/main.py

    from typing import Annotated
    
    from fastapi import FastAPI, Header, HTTPException
    from pydantic import BaseModel
    
    fake_secret_token = "coneofsilence"
    
    fake_db = {
        "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"},
        "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"},
    }
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        id: str
        title: str
        description: str | None = None
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  6. 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}
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 224 bytes
    - Viewed (0)
  7. docs_src/dependency_testing/tutorial001_an.py

    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    async def common_parameters(
        q: Union[str, None] = None, skip: int = 0, limit: int = 100
    ):
        return {"q": q, "skip": skip, "limit": limit}
    
    
    @app.get("/items/")
    async def read_items(commons: Annotated[dict, Depends(common_parameters)]):
        return {"message": "Hello Items!", "params": commons}
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  8. docs_src/body_multiple_params/tutorial005_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]):
        results = {"item_id": item_id, "item": item}
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 428 bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/schema-extra-example.md

        ```
    
    === "Python 3.10+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="18-25"
        {!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="20-27"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/body-fields.md

        {!> ../../../docs_src/body_fields/tutorial001_an.py!}
        ```
    
    === "Python 3.10+ Annotated가 없는 경우"
    
        !!! tip "팁"
            가능하다면 `Annotated`가 달린 버전을 권장합니다.
    
        ```Python hl_lines="2"
        {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+ Annotated가 없는 경우"
    
        !!! tip "팁"
            가능하다면 `Annotated`가 달린 버전을 권장합니다.
    
        ```Python hl_lines="4"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 4.3K bytes
    - Viewed (0)
Back to top