- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 30 for create_items (0.09 seconds)
-
fastapi/.agents/skills/fastapi/SKILL.md
@app.post("/items/") async def create_item(item: Item, project_id: Annotated[int, Query()]): ... ``` instead of this: ```python # DO NOT DO THIS class Item(BaseModel): name: str = ... description: str | None = None price: float = Field(..., gt=0) app = FastAPI() @app.post("/items/") async def create_item(item: Item, project_id: Annotated[int, Query(...)]): ...
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 10.1K bytes - Click Count (0) -
docs_src/response_status_code/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 145 bytes - Click Count (0) -
docs_src/strict_content_type/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Feb 23 17:45:20 GMT 2026 - 231 bytes - Click Count (0) -
docs_src/path_operation_advanced_configuration/tutorial006_py310.py
"description": {"type": "string"}, }, } } }, "required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() data = magic_data_reader(raw_body)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1K bytes - Click Count (0) -
docs_src/handling_errors/tutorial005_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 626 bytes - Click Count (0) -
docs_src/path_operation_advanced_configuration/tutorial007_py310.py
@app.post( "/items/", openapi_extra={ "requestBody": { "content": {"application/x-yaml": {"schema": Item.model_json_schema()}}, "required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() try: data = yaml.safe_load(raw_body) except yaml.YAMLError: raise HTTPException(status_code=422, detail="Invalid YAML") try:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 797 bytes - Click Count (0) -
src/test/java/org/codelibs/fess/dict/stopwords/StopwordsItemTest.java
@Test public void test_createMode() { // Test special behavior when id is 0 (create mode) StopwordsItem createItem = new StopwordsItem(0, "newword"); assertTrue(createItem.isUpdated()); assertEquals("newword", createItem.getNewInput()); assertEquals("newword", createItem.toLineString()); // Non-zero id should not auto-set newInputCreated: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 11.4K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/suggest/entity/SuggestItemMergerTest.java
SuggestItem item1 = createItem("test text", 10L, 5L, 1.0f); SuggestItem item2 = createItem("test text", 20L, 15L, 2.0f); SuggestItem merged = SuggestItemMerger.merge(item1, item2); assertEquals("test text", merged.getText()); } @Test public void testMerge_preservesId() { SuggestItem item1 = createItem("text", 10L, 5L, 1.0f);Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Sun Feb 01 12:48:24 GMT 2026 - 6K bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial002_py310.py
class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", tags=["items"]) async def create_item(item: Item) -> Item: return item @app.get("/items/", tags=["items"]) async def read_items(): return [{"name": "Foo", "price": 42}] @app.get("/users/", tags=["users"]) async def read_users():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 12:07:26 GMT 2026 - 524 bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial004_py310.py
class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", summary="Create an item") async def create_item(item: Item) -> Item: """ Create an item with all the information: - **name**: each item must have a name - **description**: a long description - **price**: required
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 12:07:26 GMT 2026 - 625 bytes - Click Count (0)