Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 246 for tourer (0.33 sec)

  1. docs_src/openapi_callbacks/tutorial001.py

    
    class InvoiceEventReceived(BaseModel):
        ok: bool
    
    
    invoices_callback_router = APIRouter()
    
    
    @invoices_callback_router.post(
        "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived
    )
    def invoice_notification(body: InvoiceEvent):
        pass
    
    
    @app.post("/invoices/", callbacks=invoices_callback_router.routes)
    def create_invoice(invoice: Invoice, callback_url: Union[HttpUrl, None] = None):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  2. 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)
  3. istioctl/pkg/proxyconfig/testdata/config_dump.json

                          },
                          "http_filters": [
                            {
                              "name": "envoy.filters.http.router",
                              "typed_config": {
                                "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
                              }
                            }
                          ]
                        }
                      }
    Json
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Jan 03 23:08:06 GMT 2024
    - 54.8K bytes
    - Viewed (1)
  4. docs_src/bigger_applications/app_an/routers/items.py

    from ..dependencies import get_token_header
    
    router = APIRouter(
        prefix="/items",
        tags=["items"],
        dependencies=[Depends(get_token_header)],
        responses={404: {"description": "Not found"}},
    )
    
    
    fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}}
    
    
    @router.get("/")
    async def read_items():
        return fake_items_db
    
    
    @router.get("/{item_id}")
    async def read_item(item_id: str):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1011 bytes
    - Viewed (0)
  5. tests/test_include_route.py

    from fastapi.responses import JSONResponse
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    router = APIRouter()
    
    
    @router.route("/items/")
    def read_items(request: Request):
        return JSONResponse({"hello": "world"})
    
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    def test_sub_router():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 496 bytes
    - Viewed (0)
  6. clause/where.go

    				if len(v.Exprs) == 1 {
    					if e, ok := v.Exprs[0].(Expr); ok {
    						sql := strings.ToUpper(e.SQL)
    						wrapInParentheses = strings.Contains(sql, AndWithSpace) || strings.Contains(sql, OrWithSpace)
    					}
    				}
    			case AndConditions:
    				if len(v.Exprs) == 1 {
    					if e, ok := v.Exprs[0].(Expr); ok {
    						sql := strings.ToUpper(e.SQL)
    						wrapInParentheses = strings.Contains(sql, AndWithSpace) || strings.Contains(sql, OrWithSpace)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  7. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/scopes/FirNonStaticMembersScope.kt

     *
     * Inner classes are included because they are accessible from a value of the outer class. For example:
     *
     * ```
     * class Outer {
     *     inner class Inner
     * }
     *
     * fun foo() {
     *     val outer = Outer()
     *     outer.Inner()
     * }
     * ```
     *
     * While Kotlin always expects a constructor call when accessing `outer.Inner`, it nonetheless requires inner classes to be contained in
     * non-static scopes.
     */
    Plain Text
    - Registered: Fri Mar 22 08:18:09 GMT 2024
    - Last Modified: Tue Oct 10 13:38:00 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  8. tests/test_modules_same_name_body/app/main.py

    from fastapi import FastAPI
    
    from . import a, b
    
    app = FastAPI()
    
    app.include_router(a.router, prefix="/a")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 28 17:35:16 GMT 2019
    - 150 bytes
    - Viewed (0)
  9. docs_src/custom_request_and_route/tutorial003.py

            return custom_route_handler
    
    
    app = FastAPI()
    router = APIRouter(route_class=TimedRoute)
    
    
    @app.get("/")
    async def not_timed():
        return {"message": "Not timed"}
    
    
    @router.get("/timed")
    async def timed():
        return {"message": "It's the time of my life"}
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/bigger-applications.md

    ### ❎ 📛 💥
    
    👥 🏭 🔁 `items` 🔗, ↩️ 🏭 🚮 🔢 `router`.
    
    👉 ↩️ 👥 ✔️ ➕1️⃣ 🔢 📛 `router` 🔁 `users`.
    
    🚥 👥 ✔️ 🗄 1️⃣ ⏮️ 🎏, 💖:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    `router` ⚪️➡️ `users` 🔜 📁 1️⃣ ⚪️➡️ `items` & 👥 🚫🔜 💪 ⚙️ 👫 🎏 🕰.
    
    , 💪 ⚙️ 👯‍♂️ 👫 🎏 📁, 👥 🗄 🔁 🔗:
    
    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)
Back to top