Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 41 for Timmons (0.07 sec)

  1. docs_src/dependencies/tutorial001_02_an.py

    
    CommonsDep = Annotated[dict, Depends(common_parameters)]
    
    
    @app.get("/items/")
    async def read_items(commons: CommonsDep):
        return commons
    
    
    @app.get("/users/")
    async def read_users(commons: CommonsDep):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 495 bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/dependencies/classes-as-dependencies.md

    **FastAPI** ruft die Klasse `CommonQueryParams` auf. Dadurch wird eine „Instanz“ dieser Klasse erstellt und die Instanz wird als Parameter `commons` an Ihre Funktion überreicht.
    
    ## Typannotation vs. `Depends`
    
    Beachten Sie, wie wir `CommonQueryParams` im obigen Code zweimal schreiben:
    
    === "Python 3.8+"
    
        ```Python
        commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
        ```
    
    === "Python 3.8+ nicht annotiert"
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 18:01:58 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial002_py310.py

            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: CommonQueryParams = Depends(CommonQueryParams)):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 624 bytes
    - Viewed (0)
  4. docs_src/dependencies/tutorial004_py310.py

            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: CommonQueryParams = Depends()):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 607 bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial003.py

            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons=Depends(CommonQueryParams)):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 635 bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial004_an_py310.py

            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: Annotated[CommonQueryParams, Depends()]):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 647 bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial002_an_py39.py

            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 677 bytes
    - Viewed (0)
  8. docs_src/dependencies/tutorial003_an_py39.py

            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: Annotated[Any, Depends(CommonQueryParams)]):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 668 bytes
    - Viewed (0)
  9. docs_src/dependencies/tutorial001_02_an_py39.py

    
    CommonsDep = Annotated[dict, Depends(common_parameters)]
    
    
    @app.get("/items/")
    async def read_items(commons: CommonsDep):
        return commons
    
    
    @app.get("/users/")
    async def read_users(commons: CommonsDep):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 466 bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md

    ## Аннотация типа или `Depends`
    
    Обратите внимание, что в приведенном выше коде мы два раза пишем `CommonQueryParams`:
    
    === "Python 3.6+ без Annotated"
    
        !!! tip "Подсказка"
            Рекомендуется использовать версию с `Annotated` если возможно.
    
        ```Python
        commons: CommonQueryParams = Depends(CommonQueryParams)
        ```
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 12 11:12:19 UTC 2024
    - 16.3K bytes
    - Viewed (0)
Back to top