- Sort Score
- Result 10 results
- Languages All
Results 181 - 190 of 1,926 for App (0.01 sec)
-
tests/test_openapi_model_description_trim_on_formfeed.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class MyModel(BaseModel): """ A model with a form feed character in the title. \f Text after form feed character. """ @app.get("/foo") def foo(v: MyModel): # pragma: no cover pass client = TestClient(app) def test_openapi(): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Jun 17 07:46:27 UTC 2025 - 660 bytes - Viewed (0) -
tests/test_typing_python39.py
tuple[int, ...]: [1, 2, 3], # `tuple` is converted to `list` } for test_type, expect in types.items(): app = FastAPI() @app.post("/", response_model=test_type) def post_endpoint(input: test_type): return input res = TestClient(app).post("/", json=expect) assert res.status_code == 200, res.json()
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 709 bytes - Viewed (0) -
tests/test_forms_single_model.py
from pydantic import BaseModel, Field app = FastAPI() class FormModel(BaseModel): username: str lastname: str age: Optional[int] = None tags: list[str] = ["foo", "bar"] alias_with: str = Field(alias="with", default="nothing") class FormModelExtraAllow(BaseModel): param: str model_config = {"extra": "allow"} @app.post("/form/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.4K bytes - Viewed (0) -
tests/test_security_scopes_sub_dependency.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.9K bytes - Viewed (0) -
docs/ru/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 - 23.2K bytes - Viewed (0) -
tests/test_response_model_default_factory.py
from pydantic import BaseModel, Field app = FastAPI() class ResponseModel(BaseModel): code: int = 200 message: str = Field(default_factory=lambda: "Successful operation.") @app.get( "/response_model_has_default_factory_return_dict", response_model=ResponseModel, ) async def response_model_has_default_factory_return_dict(): return {"code": 200} @app.get(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 18:51:40 UTC 2025 - 1.2K bytes - Viewed (0) -
docs_src/response_model/tutorial005_py310.py
"tax": 10.5, }, } @app.get( "/items/{item_id}/name", response_model=Item, response_model_include={"name", "description"}, ) async def read_item_name(item_id: str): return items[item_id] @app.get("/items/{item_id}/public", response_model=Item, response_model_exclude={"tax"}) async def read_item_public_data(item_id: str):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 816 bytes - Viewed (0) -
docs_src/response_model/tutorial005_py39.py
"price": 50.2, "tax": 10.5, }, } @app.get( "/items/{item_id}/name", response_model=Item, response_model_include={"name", "description"}, ) async def read_item_name(item_id: str): return items[item_id] @app.get("/items/{item_id}/public", response_model=Item, response_model_exclude={"tax"}) async def read_item_public_data(item_id: str):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 848 bytes - Viewed (0) -
docs_src/metadata/tutorial001_py39.py
You can **read items**. ## Users You will be able to: * **Create users** (_not implemented_). * **Read users** (_not implemented_). """ app = FastAPI( title="ChimichangApp", description=description, summary="Deadpool's favorite app. Nuff said.", version="0.0.1", terms_of_service="http://example.com/terms/", contact={ "name": "Deadpoolio the Amazing",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 805 bytes - Viewed (0) -
docs_src/request_files/tutorial003_py39.py
from fastapi import FastAPI, File, UploadFile from fastapi.responses import HTMLResponse app = FastAPI() @app.post("/files/") async def create_files( files: list[bytes] = File(description="Multiple files as bytes"), ): return {"file_sizes": [len(file) for file in files]} @app.post("/uploadfiles/") async def create_upload_files( files: list[UploadFile] = File(description="Multiple files as UploadFile"), ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 888 bytes - Viewed (0)