Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 4,638 for commons (0.18 sec)

  1. docs_src/dependencies/tutorial002_an.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})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 706 bytes
    - Viewed (0)
  2. docs_src/dependencies/tutorial001_02_an_py310.py

    app = FastAPI()
    
    
    async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100):
        return {"q": q, "skip": skip, "limit": limit}
    
    
    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):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 447 bytes
    - Viewed (0)
  3. maven-core/src/test/java/org/apache/maven/project/harness/PomTestWrapper.java

     */
    package org.apache.maven.project.harness;
    
    import java.io.File;
    import java.util.Iterator;
    import java.util.Objects;
    
    import org.apache.commons.jxpath.JXPathContext;
    import org.apache.commons.jxpath.JXPathNotFoundException;
    import org.apache.commons.jxpath.ri.JXPathContextReferenceImpl;
    import org.apache.maven.project.MavenProject;
    
    public class PomTestWrapper {
    
        private File pomFile;
    
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Mon Dec 26 15:12:32 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

        ```Python
        commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python
        commons: CommonQueryParams = Depends(CommonQueryParams)
        ```
    
    ...you write:
    
    === "Python 3.8+"
    
        ```Python
        commons: Annotated[CommonQueryParams, Depends()]
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  5. docs_src/dependency_testing/tutorial001_an_py39.py

    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}
    
    
    @app.get("/users/")
    async def read_users(commons: Annotated[dict, Depends(common_parameters)]):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial003_an_py310.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})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 655 bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial002.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})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 656 bytes
    - Viewed (0)
  8. docs_src/dependencies/tutorial003_an.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})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 697 bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md

        ```Python hl_lines="19"
        {!> ../../../docs_src/dependencies/tutorial002.py!}
        ```
    
    **FastAPI** 调用 `CommonQueryParams` 类。这将创建该类的一个 "实例",该实例将作为参数 `commons` 被传递给你的函数。
    
    ## 类型注解 vs `Depends`
    
    注意,我们在上面的代码中编写了两次`CommonQueryParams`:
    
    ```Python
    commons: CommonQueryParams = Depends(CommonQueryParams)
    ```
    
    最后的 `CommonQueryParams`:
    
    ```Python
    ... = Depends(CommonQueryParams)
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  10. build-logic/dependency-modules/src/main/kotlin/gradlebuild/modules/extension/ExternalModulesExtension.kt

        val commonsCodec = "commons-codec:commons-codec"
        val commonsCompress = "org.apache.commons:commons-compress"
        val commonsHttpclient = "org.apache.httpcomponents:httpclient"
        val commonsIo = "commons-io:commons-io"
        val commonsLang = "commons-lang:commons-lang"
        val commonsLang3 = "org.apache.commons:commons-lang3"
        val commonsMath = "org.apache.commons:commons-math3"
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Tue Apr 16 15:50:58 GMT 2024
    - 14.4K bytes
    - Viewed (0)
Back to top