Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 913 for annotated (0.15 sec)

  1. docs_src/request_files/tutorial001_03_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[bytes, File(description="A file read as bytes")]):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(
        file: Annotated[UploadFile, File(description="A file read as UploadFile")],
    ):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 421 bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/security/get-current-user.md

        ```
    
    === "Python 3.10+ nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="3  10-14"
        {!> ../../../docs_src/security/tutorial002_py310.py!}
        ```
    
    === "Python 3.8+ nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="5  12-16"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 18:08:05 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  3. fastapi/security/api_key.py

            self,
            *,
            name: Annotated[str, Doc("Header name.")],
            scheme_name: Annotated[
                Optional[str],
                Doc(
                    """
                    Security scheme name.
    
                    It will be included in the generated OpenAPI (e.g. visible at `/docs`).
                    """
                ),
            ] = None,
            description: Annotated[
                Optional[str],
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Apr 23 22:29:18 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/extra-data-types.md

        ```
    
    === "Python 3.10+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="1  2  11-15"
        {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="1  2  12-16"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 14 02:45:10 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  5. docs_src/request_forms/tutorial001_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, Form
    
    app = FastAPI()
    
    
    @app.post("/login/")
    async def login(username: Annotated[str, Form()], password: Annotated[str, Form()]):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 223 bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/dependencies/sub-dependencies.md

        ```
    
    === "Python 3.10 nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="6-7"
        {!> ../../../docs_src/dependencies/tutorial005_py310.py!}
        ```
    
    === "Python 3.8 nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="8-9"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 18:09:48 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/extra-data-types.md

        ```
    
    === "Python 3.10+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="1  2  11-15"
        {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="1  2  12-16"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. docs/ru/docs/tutorial/header-params.md

        {!> ../../../docs_src/header_params/tutorial001_an.py!}
        ```
    
    === "Python 3.10+ без Annotated"
    
        !!! tip "Подсказка"
            Предпочтительнее использовать версию с аннотацией, если это возможно.
    
        ```Python hl_lines="1"
        {!> ../../../docs_src/header_params/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+ без Annotated"
    
        !!! tip "Подсказка"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  9. 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)
  10. docs_src/dependencies/tutorial006_an.py

    from fastapi import Depends, FastAPI, Header, HTTPException
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    async def verify_token(x_token: Annotated[str, Header()]):
        if x_token != "fake-super-secret-token":
            raise HTTPException(status_code=400, detail="X-Token header invalid")
    
    
    async def verify_key(x_key: Annotated[str, Header()]):
        if x_key != "fake-super-secret-key":
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 643 bytes
    - Viewed (0)
Back to top