- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 2,056 for app (2.25 sec)
-
tests/test_tutorial/test_advanced_middleware/test_tutorial002.py
from docs_src.advanced_middleware.tutorial002 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 570 bytes - Viewed (0) -
docs/zh/docs/tutorial/bigger-applications.md
/// * `app` 目录包含了所有内容。并且它有一个空文件 `app/__init__.py`,因此它是一个「Python 包」(「Python 模块」的集合):`app`。 * 它包含一个 `app/main.py` 文件。由于它位于一个 Python 包(一个包含 `__init__.py` 文件的目录)中,因此它是该包的一个「模块」:`app.main`。 * 还有一个 `app/dependencies.py` 文件,就像 `app/main.py` 一样,它是一个「模块」:`app.dependencies`。 * 有一个子目录 `app/routers/` 包含另一个 `__init__.py` 文件,因此它是一个「Python 子包」:`app.routers`。 * 文件 `app/routers/items.py` 位于 `app/routers/` 包中,因此它是一个子模块:`app.routers.items`。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 18.4K bytes - Viewed (0) -
tests/test_dependency_overrides.py
from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() async def common_parameters(q: str, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/main-depends/") async def main_depends(commons: dict = Depends(common_parameters)): return {"in": "main-depends", "params": commons}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 15.4K bytes - Viewed (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.behind_a_proxy.tutorial001 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/dict/kuromoji/ApiAdminDictKuromojiAction.java
import org.apache.logging.log4j.Logger; import org.codelibs.fess.app.pager.KuromojiPager; import org.codelibs.fess.app.service.KuromojiService; import org.codelibs.fess.app.web.CrudMode; import org.codelibs.fess.app.web.admin.dict.kuromoji.UploadForm; import org.codelibs.fess.app.web.api.ApiResult; import org.codelibs.fess.app.web.api.admin.FessApiAdminAction; import org.codelibs.fess.dict.kuromoji.KuromojiFile;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 7.3K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/admin/AdminAction.java
import org.codelibs.fess.app.web.admin.dashboard.AdminDashboardAction; import org.codelibs.fess.app.web.admin.dataconfig.AdminDataconfigAction; import org.codelibs.fess.app.web.admin.design.AdminDesignAction; import org.codelibs.fess.app.web.admin.dict.AdminDictAction; import org.codelibs.fess.app.web.admin.duplicatehost.AdminDuplicatehostAction; import org.codelibs.fess.app.web.admin.elevateword.AdminElevatewordAction;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 18.7K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py
from fastapi.websockets import WebSocketDisconnect from ...utils import needs_py310 @pytest.fixture(name="app") def get_app(): from docs_src.websockets.tutorial002_an_py310 import app return app @needs_py310 def test_main(app: FastAPI): client = TestClient(app) response = client.get("/") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
docs/em/docs/advanced/middleware.md
```Python from unicorn import UnicornMiddleware app = SomeASGIApp() new_app = UnicornMiddleware(app, some_config="rainbow") ``` ✋️ FastAPI (🤙 💃) 🚚 🙅 🌌 ⚫️ 👈 ⚒ 💭 👈 🔗 🛠️ 🍵 💽 ❌ & 🛃 ⚠ 🐕🦺 👷 ☑. 👈, 👆 ⚙️ `app.add_middleware()` (🖼 ⚜). ```Python from fastapi import FastAPI from unicorn import UnicornMiddleware app = FastAPI() app.add_middleware(UnicornMiddleware, some_config="rainbow") ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.2K bytes - Viewed (0) -
docs_src/extending_openapi/tutorial001.py
from fastapi import FastAPI from fastapi.openapi.utils import get_openapi app = FastAPI() @app.get("/items/") async def read_items(): return [{"name": "Foo"}] def custom_openapi(): if app.openapi_schema: return app.openapi_schema openapi_schema = get_openapi( title="Custom title", version="2.5.0", summary="This is a very custom OpenAPI schema",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 737 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d_an.py
import pytest from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.dependencies.tutorial008d_an import app client = TestClient(app) return client def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0)