- Sort Score
- Result 10 results
- Languages All
Results 291 - 300 of 889 for item01 (0.03 sec)
-
docs_src/dependencies/tutorial004_py39.py
self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: CommonQueryParams = Depends()): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 639 bytes - Viewed (0) -
docs_src/dependencies/tutorial004_an_py39.py
self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: Annotated[CommonQueryParams, Depends()]): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 660 bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py
return {"message": "Admin Access"} router = APIRouter(dependencies=[Security(oauth2_scheme, scopes=["read"])]) @router.get("/items/") async def read_items(token: Optional[str] = Depends(oauth2_scheme)): return {"token": token} @router.post("/items/") async def create_item( token: Optional[str] = Security(oauth2_scheme, scopes=["read", "write"]), ): return {"token": token}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.6K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial002_tutorial003_tutorial004.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial002.py
def test_path_operation(client: TestClient): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_img(client: TestClient): shutil.copy("./docs/en/docs/img/favicon.png", "./image.png") response = client.get("/items/foo?img=1") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.7K bytes - Viewed (0) -
tests/test_validation_error_context.py
raise exc @app.get("/users/{user_id}") def get_user(user_id: int): return {"user_id": user_id} # pragma: no cover @app.get("/items/", response_model=Item) def get_item(): return {"name": "Widget"} @sub_app.get("/items/", response_model=Item) def get_sub_item(): return {"name": "Widget"} # pragma: no cover @app.websocket("/ws/{item_id}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 06 12:21:57 UTC 2025 - 4.7K bytes - Viewed (0) -
tests/test_invalid_sequence_param.py
app = FastAPI() class Item(BaseModel): title: str @app.get("/items/") def read_items(q: list[Item] = Query(default=None)): pass # pragma: no cover def test_invalid_tuple(): with pytest.raises(AssertionError): app = FastAPI() class Item(BaseModel): title: str @app.get("/items/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_path_params/test_tutorial001.py
}, }, "summary": "Read Item", }, }, }, "components": { "schemas": { "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError",Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/query_test.go
Number2: 200, Number3: 300.1, Now: &now, Item1: &QueryResetItem{ ID: "u_1_1", Name: "item_1_1", }, Item2: &QueryResetItem{ ID: "u_1_2", Name: "item_1_2", }, } q2 := QueryResetNullValue{ Item1: &QueryResetItem{ ID: "u_2_1", Name: "item_2_1", }, Item2: &QueryResetItem{ ID: "u_2_2", Name: "item_2_2", },Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Tue Jul 22 06:21:04 UTC 2025 - 51K bytes - Viewed (0) -
tests/test_tutorial/test_response_status_code/test_tutorial001_tutorial002.py
client = TestClient(mod.app) return client def test_create_item(client: TestClient): response = client.post("/items/", params={"name": "Test Item"}) assert response.status_code == 201, response.text assert response.json() == {"name": "Test Item"} def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.textRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 3.3K bytes - Viewed (0)