- Sort Score
- Num 10 results
- Language All
Results 971 - 980 of 4,691 for Done (0.1 seconds)
-
guava-tests/test/com/google/common/primitives/IntsTest.java
} public void testToArray() { // need explicit type parameter to avoid javac warning!? List<Integer> none = Arrays.<Integer>asList(); assertThat(Ints.toArray(none)).isEqualTo(EMPTY); List<Integer> one = Arrays.asList((int) 1); assertThat(Ints.toArray(one)).isEqualTo(ARRAY1); int[] array = {(int) 0, (int) 1, (int) 0xdeadbeef};
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 01:43:32 GMT 2026 - 29.4K bytes - Click Count (0) -
docs_src/body/tutorial001_py310.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None app = FastAPI() @app.post("/items/") async def create_item(item: Item):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 271 bytes - Click Count (0) -
docs_src/dataclasses_/tutorial001_py310.py
from dataclasses import dataclass from fastapi import FastAPI @dataclass class Item: name: str price: float description: str | None = None tax: float | None = None app = FastAPI() @app.post("/items/") async def create_item(item: Item):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 275 bytes - Click Count (0) -
docs_src/cookie_param_models/tutorial002_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 343 bytes - Click Count (0) -
docs_src/cookie_param_models/tutorial001_an_py310.py
from typing import Annotated from fastapi import Cookie, FastAPI from pydantic import BaseModel app = FastAPI() class Cookies(BaseModel): session_id: str fatebook_tracker: str | None = None googall_tracker: str | None = None @app.get("/items/") async def read_items(cookies: Annotated[Cookies, Cookie()]):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 343 bytes - Click Count (0) -
docs/zh/docs/tutorial/query-params-str-validations.md
由于这种情况下(不使用 `Annotated`)我们必须把函数中的默认值 `None` 替换为 `Query()`,因此需要通过参数 `Query(default=None)` 来设置默认值,它起到同样的作用(至少对 FastAPI 来说)。 所以: ```Python q: str | None = Query(default=None) ``` ...会让参数变成可选,默认值为 `None`,等同于: ```Python q: str | None = None ``` 但使用 `Query` 的版本会显式把它声明为一个查询参数。 然后,我们可以向 `Query` 传入更多参数。本例中是适用于字符串的 `max_length` 参数:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 15.4K bytes - Click Count (0) -
docs_src/dependency_testing/tutorial001_py310.py
async def override_dependency(q: str | None = None): return {"q": q, "skip": 5, "limit": 10} app.dependency_overrides[common_parameters] = override_dependency def test_override_in_items(): response = client.get("/items/") assert response.status_code == 200 assert response.json() == { "message": "Hello Items!", "params": {"q": None, "skip": 5, "limit": 10}, }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.4K bytes - Click Count (0) -
docs_src/body_multiple_params/tutorial005_an_py310.py
from typing import Annotated from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]): results = {"item_id": item_id, "item": item}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 409 bytes - Click Count (0) -
tests/test_openapi_separate_input_output_schemas.py
class SubItem(BaseModel): subname: str sub_description: str | None = None tags: list[str] = [] model_config = {"json_schema_serialization_defaults_required": True} class Item(BaseModel): name: str description: str | None = None sub: SubItem | None = None model_config = {"json_schema_serialization_defaults_required": True}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 27.8K bytes - Click Count (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial002.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 11.7K bytes - Click Count (0)