Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 105 for routes (0.23 sec)

  1. docs/zh/docs/tutorial/bigger-applications.md

    ### 避免名称冲突
    
    我们将直接导入 `items` 子模块,而不是仅导入其 `router` 变量。
    
    这是因为我们在 `users` 子模块中也有另一个名为 `router` 的变量。
    
    如果我们一个接一个地导入,例如:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    来自 `users` 的 `router` 将覆盖来自 `items` 中的 `router`,我们将无法同时使用它们。
    
    因此,为了能够在同一个文件中使用它们,我们直接导入子模块:
    
    ```Python hl_lines="5" title="app/main.py"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/bigger-applications.md

    * 📤 `app/dependencies.py` 📁, 💖 `app/main.py`, ⚫️ "🕹": `app.dependencies`.
    * 📤 📁 `app/routers/` ⏮️ ➕1️⃣ 📁 `__init__.py`, ⚫️ "🐍 📦": `app.routers`.
    * 📁 `app/routers/items.py` 🔘 📦, `app/routers/`,, ⚫️ 🔁: `app.routers.items`.
    * 🎏 ⏮️ `app/routers/users.py`, ⚫️ ➕1️⃣ 🔁: `app.routers.users`.
    * 📤 📁 `app/internal/` ⏮️ ➕1️⃣ 📁 `__init__.py`, ⚫️ ➕1️⃣ "🐍 📦": `app.internal`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 15.6K bytes
    - Viewed (0)
  3. docs/fr/docs/tutorial/first-steps.md

    ```Python hl_lines="1"
    {!../../../docs_src/first_steps/tutorial001.py!}
    ```
    
    `FastAPI` est une classe Python qui fournit toutes les fonctionnalités nécessaires au lancement de votre API.
    
    !!! note "Détails techniques"
        `FastAPI` est une classe héritant directement de `Starlette`.
    
        Vous pouvez donc aussi utiliser toutes les fonctionnalités de <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a> depuis `FastAPI`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 20:52:31 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  4. tests/test_dependency_overrides.py

    
    @router.get("/router-depends/")
    async def router_depends(commons: dict = Depends(common_parameters)):
        return {"in": "router-depends", "params": commons}
    
    
    @router.get("/router-decorator-depends/", dependencies=[Depends(common_parameters)])
    async def router_decorator_depends():
        return {"in": "router-decorator-depends"}
    
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/eventbus/EventBus.java

     *
     * <h2>Posting Events</h2>
     *
     * <p>To post an event, simply provide the event object to the {@link #post(Object)} method. The
     * EventBus instance will determine the type of event and route it to all registered listeners.
     *
     * <p>Events are routed based on their type &mdash; an event will be delivered to any subscriber for
     * any type to which the event is assignable. This includes implemented interfaces, all
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Aug 25 16:37:57 GMT 2021
    - 12.8K bytes
    - Viewed (0)
  6. tests/test_annotated.py

        assert response.json() == {"foo": "baz"}
    
    
    def test_nested_router():
        app = FastAPI()
    
        router = APIRouter(prefix="/nested")
    
        @router.get("/test")
        async def test(var: Annotated[str, Query()] = "bar"):
            return {"foo": var}
    
        app.include_router(router)
    
        client = TestClient(app)
    
        response = client.get("/nested/test")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  7. istioctl/pkg/describe/describe_test.go

    VirtualService: bookinfo
       Route to host "productpage" with weight 30%
       Route to host "productpage2" with weight 20%
       Route to host "productpage3" with weight 50%
       Match: /prefix*
    --------------------
    Exposed on Ingress Gateway http://1.1.1.1
    Exposed on Ingress Gateway http://2.2.2.2
    VirtualService: bookinfo
       Route to host "productpage" with weight 30%
       Route to host "productpage2" with weight 20%
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Mar 28 09:54:01 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  8. tests/test_infer_param_optionality.py

    
    @item_router.get("/{item_id}")
    def get_item(item_id: str, user_id: Optional[str] = None):
        if user_id is None:
            return {"item_id": item_id}
        else:
            return {"item_id": item_id, "user_id": user_id}
    
    
    app.include_router(user_router, prefix="/users")
    app.include_router(item_router, prefix="/items")
    
    app.include_router(item_router, prefix="/users/{user_id}/items")
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.3K bytes
    - Viewed (0)
  9. cmd/admin-handlers_test.go

    )
    
    // adminErasureTestBed - encapsulates subsystems that need to be setup for
    // admin-handler unit tests.
    type adminErasureTestBed struct {
    	erasureDirs []string
    	objLayer    ObjectLayer
    	router      *mux.Router
    	done        context.CancelFunc
    }
    
    // prepareAdminErasureTestBed - helper function that setups a single-node
    // Erasure backend for admin-handler tests.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        val receivedResponseAtMillis: Long = response.receivedResponseAtMillis()
      }
    
      @Test @Disabled
      fun route() {
        val route: Route = factory.newRoute()
        val address: Address = route.address()
        val proxy: Proxy = route.proxy()
        val inetSocketAddress: InetSocketAddress = route.socketAddress()
      }
    
      @Test @Disabled
      fun tlsVersion() {
        val tlsVersion: TlsVersion = TlsVersion.TLS_1_3
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.3K bytes
    - Viewed (0)
Back to top