Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 1,926 for App (0.01 sec)

  1. tests/test_tutorial/test_advanced_middleware/test_tutorial002.py

    from docs_src.advanced_middleware.tutorial002_py39 import app
    
    
    def test_middleware():
        client = TestClient(app, base_url="http://example.com")
        response = client.get("/")
        assert response.status_code == 200, response.text
        client = TestClient(app, base_url="http://subdomain.example.com")
        response = client.get("/")
        assert response.status_code == 200, response.text
        client = TestClient(app, base_url="http://invalidhost")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 575 bytes
    - Viewed (0)
  2. tests/test_deprecated_openapi_prefix.py

    from fastapi import FastAPI, Request
    from fastapi.testclient import TestClient
    
    app = FastAPI(openapi_prefix="/api/v1")
    
    
    @app.get("/app")
    def read_main(request: Request):
        return {"message": "Hello World", "root_path": request.scope.get("root_path")}
    
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  3. fastapi/middleware/asyncexitstack.py

        def __init__(
            self, app: ASGIApp, context_name: str = "fastapi_middleware_astack"
        ) -> None:
            self.app = app
            self.context_name = context_name
    
        async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
            async with AsyncExitStack() as stack:
                scope[self.context_name] = stack
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 03:29:38 UTC 2025
    - 637 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_settings/test_tutorial001.py

    from pytest import MonkeyPatch
    
    
    @pytest.fixture(name="app", params=[pytest.param("tutorial001_py39")])
    def get_app(request: pytest.FixtureRequest, monkeypatch: MonkeyPatch):
        monkeypatch.setenv("ADMIN_EMAIL", "******@****.***")
        mod = importlib.import_module(f"docs_src.settings.{request.param}")
        return mod.app
    
    
    def test_settings(app):
        client = TestClient(app)
        response = client.get("/info")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 690 bytes
    - Viewed (0)
  5. docs_src/generate_clients/tutorial002_py39.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    class ResponseMessage(BaseModel):
        message: str
    
    
    class User(BaseModel):
        username: str
        email: str
    
    
    @app.post("/items/", response_model=ResponseMessage, tags=["items"])
    async def create_item(item: Item):
        return {"message": "Item received"}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Mar 04 22:02:18 UTC 2022
    - 730 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.behind_a_proxy.tutorial001_py39 import app
    
    client = TestClient(app, root_path="/api/v1")
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi():
        response = client.get("/openapi.json")
        assert response.status_code == 200
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1K bytes
    - Viewed (0)
  7. docs/zh-hant/docs/tutorial/first-steps.md

    一個「裝飾器」會對下面的函式做一些事情。
    
    在這種情況下,這個裝飾器告訴 **FastAPI** 那個函式對應於 **路徑** `/` 和 **操作** `get`.
    
    這就是「**路徑操作裝飾器**」。
    
    ///
    
    你也可以使用其他的操作:
    
    * `@app.post()`
    * `@app.put()`
    * `@app.delete()`
    
    以及更少見的:
    
    * `@app.options()`
    * `@app.head()`
    * `@app.patch()`
    * `@app.trace()`
    
    /// tip
    
    你可以自由地使用每個操作(HTTP 方法)。
    
    **FastAPI** 不強制任何特定的意義。
    
    這裡的資訊作為一個指南,而不是要求。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 11.6K bytes
    - Viewed (0)
  8. docs/ko/docs/tutorial/first-steps.md

    이것이 "**경로 작동 데코레이터**"입니다.
    
    ///
    
    다른 작동도 사용할 수 있습니다:
    
    * `@app.post()`
    * `@app.put()`
    * `@app.delete()`
    
    흔히 사용되지 않는 것들도 있습니다:
    
    * `@app.options()`
    * `@app.head()`
    * `@app.patch()`
    * `@app.trace()`
    
    /// tip | 팁
    
    각 작동(HTTP 메소드)을 원하는 대로 사용해도 됩니다.
    
    **FastAPI**는 특정 의미를 강제하지 않습니다.
    
    여기서 정보는 지침서일뿐 강제사항이 아닙니다.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/app/web/api/admin/dataconfig/ApiAdminDataconfigAction.java

    import org.codelibs.fess.Constants;
    import org.codelibs.fess.app.pager.DataConfigPager;
    import org.codelibs.fess.app.service.DataConfigService;
    import org.codelibs.fess.app.web.CrudMode;
    import org.codelibs.fess.app.web.api.ApiResult;
    import org.codelibs.fess.app.web.api.ApiResult.ApiConfigResponse;
    import org.codelibs.fess.app.web.api.ApiResult.ApiResponse;
    import org.codelibs.fess.app.web.api.ApiResult.ApiUpdateResponse;
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/behind-a-proxy.md

          prefixes = ["/api/v1"]
    
      [http.routers]
    
        [http.routers.app-http]
          entryPoints = ["http"]
          service = "app"
          rule = "PathPrefix(`/api/v1`)"
          middlewares = ["api-stripprefix"]
    
      [http.services]
    
        [http.services.app]
          [http.services.app.loadBalancer]
            [[http.services.app.loadBalancer.servers]]
              url = "http://127.0.0.1:8000"
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 18.6K bytes
    - Viewed (0)
Back to top