- Sort Score
- Result 10 results
- Languages All
Results 751 - 760 of 1,178 for rsync (0.05 sec)
-
docs_src/request_forms_and_files/tutorial001_an_py39.py
from typing import Annotated from fastapi import FastAPI, File, Form, UploadFile app = FastAPI() @app.post("/files/") async def create_file( file: Annotated[bytes, File()], fileb: Annotated[UploadFile, File()], token: Annotated[str, Form()], ): return { "file_size": len(file), "token": token, "fileb_content_type": fileb.content_type,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 386 bytes - Viewed (0) -
tests/test_allow_inf_nan_in_enforcing.py
import pytest from fastapi import Body, FastAPI, Query from fastapi.testclient import TestClient from typing_extensions import Annotated app = FastAPI() @app.post("/") async def get( x: Annotated[float, Query(allow_inf_nan=True)] = 0, y: Annotated[float, Query(allow_inf_nan=False)] = 0, z: Annotated[float, Query()] = 0, b: Annotated[float, Body(allow_inf_nan=False)] = 0, ) -> str: return "OK"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:27:37 UTC 2024 - 1.8K bytes - Viewed (0) -
tests/test_reponse_set_reponse_code_empty.py
from typing import Any from fastapi import FastAPI, Response from fastapi.testclient import TestClient app = FastAPI() @app.delete( "/{id}", status_code=204, response_model=None, ) async def delete_deployment( id: int, response: Response, ) -> Any: response.status_code = 400 return {"msg": "Status overwritten", "id": id} client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.1K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional_description.py
app = FastAPI() oauth2_scheme = OAuth2PasswordBearer( tokenUrl="/token", description="OAuth2PasswordBearer security scheme", auto_error=False, ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token} client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial003_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 343 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial004_an_py310_regex.py
from typing import Annotated from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ str | None, Query(min_length=3, max_length=50, regex="^fixedquery$") ] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 366 bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 392 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial007_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[Union[str, None], Query(title="Query string", min_length=3)] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 350 bytes - Viewed (0) -
docs_src/cookie_param_models/tutorial002_pv1_an_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 387 bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_pv1_py310.py
class Config: extra = "forbid" host: str save_data: bool if_modified_since: str | None = None traceparent: str | None = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: CommonHeaders = Header()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 396 bytes - Viewed (0)