- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 1,926 for App (0.01 sec)
-
tests/test_empty_router.py
from fastapi import APIRouter, FastAPI from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.get("") def get_empty(): return ["OK"] app.include_router(router, prefix="/prefix") client = TestClient(app) def test_use_empty(): with client: response = client.get("/prefix")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Jun 11 22:37:34 UTC 2023 - 805 bytes - Viewed (1) -
docs/zh/docs/tutorial/testing.md
在实际应用中,你可能会把你的测试放在另一个文件里。 您的**FastAPI**应用程序也可能由一些文件/模块组成等等。 ### **FastAPI** app 文件 假设你有一个像 [更大的应用](bigger-applications.md){.internal-link target=_blank} 中所描述的文件结构: ``` . ├── app │ ├── __init__.py │ └── main.py ``` 在 `main.py` 文件中你有一个 **FastAPI** app: {* ../../docs_src/app_testing/main.py *} ### 测试文件 然后你会有一个包含测试的文件 `test_main.py` 。app可以像Python包那样存在(一样是目录,但有个 `__init__.py` 文件): ``` hl_lines="5" .Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 5.9K bytes - Viewed (0) -
docs_src/sub_applications/tutorial001_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 274 bytes - Viewed (0) -
tests/test_ambiguous_params.py
from fastapi import Depends, FastAPI, Path from fastapi.param_functions import Query from fastapi.testclient import TestClient app = FastAPI() def test_no_annotated_defaults(): with pytest.raises( AssertionError, match="Path parameters cannot have a default value" ): @app.get("/items/{item_id}/") async def get_item(item_id: Annotated[int, Path(default=1)]): pass # pragma: nocover
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 2K bytes - Viewed (1) -
docs_src/request_files/tutorial002_py39.py
from fastapi.responses import HTMLResponse app = FastAPI() @app.post("/files/") async def create_files(files: list[bytes] = File()): return {"file_sizes": [len(file) for file in files]} @app.post("/uploadfiles/") async def create_upload_files(files: list[UploadFile]): return {"filenames": [file.filename for file in files]} @app.get("/") async def main(): content = """ <body>
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 786 bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py
return token app = FastAPI(dependencies=[Depends(get_token)]) @app.get("/") async def root(): return {"message": "Hello World"} @app.get( "/with-oauth2-scheme", dependencies=[Security(oauth2_scheme, scopes=["read", "write"])], ) async def read_with_oauth2_scheme(): return {"message": "Admin Access"} @app.get(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/user/ApiAdminUserAction.java
import org.apache.logging.log4j.Logger; import org.codelibs.fess.app.pager.UserPager; import org.codelibs.fess.app.service.UserService; import org.codelibs.fess.app.web.CrudMode; import org.codelibs.fess.app.web.api.ApiResult; import org.codelibs.fess.app.web.api.admin.FessApiAdminAction; import org.codelibs.fess.opensearch.user.exentity.User; import org.lastaflute.web.Execute; import org.lastaflute.web.response.JsonResponse;
Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Mon Nov 24 02:07:40 UTC 2025 - 7.8K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/reqheader/ApiAdminReqheaderAction.java
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.ApiErrorResponse; import org.codelibs.fess.app.web.api.ApiResult.ApiResponse; import org.codelibs.fess.app.web.api.ApiResult.ApiUpdateResponse; import org.codelibs.fess.app.web.api.ApiResult.Status;
Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 9.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/webauth/ApiAdminWebauthAction.java
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.ApiErrorResponse; import org.codelibs.fess.app.web.api.ApiResult.ApiResponse; import org.codelibs.fess.app.web.api.ApiResult.ApiUpdateResponse; import org.codelibs.fess.app.web.api.ApiResult.Status;
Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 9.1K bytes - Viewed (0) -
docs_src/bigger_applications/app_py39/main.py
from .internal import admin from .routers import items, users app = FastAPI(dependencies=[Depends(get_query_token)]) app.include_router(users.router) app.include_router(items.router) app.include_router( admin.router, prefix="/admin", tags=["admin"], dependencies=[Depends(get_token_header)], responses={418: {"description": "I'm a teapot"}}, ) @app.get("/") async def root():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 552 bytes - Viewed (0)