Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 170 for annotated (0.3 sec)

  1. docs/ko/docs/tutorial/dependencies/index.md

        단순히 `Depends`에 넘겨주기만 하면 되며, **FastAPI**는 나머지를 어찌할지 알고 있습니다.
    
    ## `Annotated`인 의존성 공유하기
    
    위의 예제에서 몇몇 작은 **코드 중복**이 있다는 것을 보았을 겁니다.
    
    `common_parameters()`의존을 사용해야 한다면, 타입 명시와 `Depends()`와 함께 전체 매개변수를 적어야 합니다:
    
    ```Python
    commons: Annotated[dict, Depends(common_parameters)]
    ```
    
    하지만 `Annotated`를 사용하고 있기에, `Annotated` 값을 변수에 저장하고 여러 장소에서 사용할 수 있습니다:
    
    === "Python 3.10+"
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  2. tests/test_annotated.py

    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/default")
    async def default(foo: Annotated[str, Query()] = "foo"):
        return {"foo": foo}
    
    
    @app.get("/required")
    async def required(foo: Annotated[str, Query(min_length=1)]):
        return {"foo": foo}
    
    
    @app.get("/multiple")
    async def multiple(foo: Annotated[str, object(), Query(min_length=1)]):
        return {"foo": foo}
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/security/oauth2-scopes.md

    === "Python 3.10+ nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="3  7  11  45  63  104  106-114  120-123  127-133  138  154"
        {!> ../../../docs_src/security/tutorial005_py310.py!}
        ```
    
    === "Python 3.9+ nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 20:26:08 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/security/simple-oauth2.md

        ```
    
    === "Python 3.10+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="2  74"
        {!> ../../../docs_src/security/tutorial003_py310.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="4  76"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  5. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/inspect/ModelRuleExtractorTest.groovy

    - Method multipleProblems(java.util.List, T) is not a valid rule method: Can only be one of [annotated with @Model and returning a model element, annotated with @Model and taking a managed model element, annotated with @Defaults, annotated with @Mutate, annotated with @Finalize, annotated with @Validate, annotated with @Rules]
    - Method multipleProblems(java.util.List, T) is not a valid rule method: A rule method cannot be private
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 24 13:45:02 UTC 2024
    - 30.4K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/security/oauth2-jwt.md

        ```
    
    === "Python 3.10+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="7  48  55-56  59-60  69-75"
        {!> ../../../docs_src/security/tutorial004_py310.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  7. fastapi/encoders.py

    
    encoders_by_class_tuples = generate_encoders_by_class_tuples(ENCODERS_BY_TYPE)
    
    
    def jsonable_encoder(
        obj: Annotated[
            Any,
            Doc(
                """
                The input object to convert to JSON.
                """
            ),
        ],
        include: Annotated[
            Optional[IncEx],
            Doc(
                """
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/dependencies/index.md

    !!! info
        FastAPI unterstützt (und empfiehlt die Verwendung von) `Annotated` seit Version 0.95.0.
    
        Wenn Sie eine ältere Version haben, werden Sie Fehler angezeigt bekommen, wenn Sie versuchen, `Annotated` zu verwenden.
    
        Bitte [aktualisieren Sie FastAPI](../../deployment/versions.md#upgrade-der-fastapi-versionen){.internal-link target=_blank} daher mindestens zu Version 0.95.1, bevor Sie `Annotated` verwenden.
    
    ### `Depends` importieren
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 18:01:10 UTC 2024
    - 13.1K 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. platforms/extensibility/plugin-development/src/integTest/groovy/org/gradle/plugin/devel/tasks/ValidatePluginsPart2IntegrationTest.groovy

                details == 'A property of type \'File\' annotated with @Input cannot determine how to interpret the file'
                solutions == [
                    'Annotate with @InputFile for regular files',
                    'Annotate with @InputFiles for collections of files',
                    'If you want to track the path, return File.absolutePath as a String and keep @Input',
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 09:03:53 UTC 2024
    - 40K bytes
    - Viewed (0)
Back to top