- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 213 for response_mode (0.08 sec)
-
docs_src/extra_models/tutorial001_py39.py
user_in_db = UserInDB(**user_in.model_dump(), hashed_password=hashed_password) print("User saved! ..not really") return user_in_db @app.post("/user/", response_model=UserOut) async def create_user(user_in: UserIn): user_saved = fake_save_user(user_in)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 949 bytes - Viewed (0) -
docs/pt/docs/tutorial/sql-databases.md
Em seguida, retornamos o mesmo *modelo de tabela* `Hero` como está na função. Mas como declaramos o `response_model` com o *modelo de dados* `HeroPublic`, o **FastAPI** usará `HeroPublic` para validar e serializar os dados. {* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[56:62] hl[56:58] *} /// tip | DicaRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 20:32:40 UTC 2025 - 16.9K bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial004_py39.py
app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information: - **name**: each item must have a name - **description**: a long description
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 712 bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial005.py
params=[ pytest.param("tutorial005_py39"), pytest.param("tutorial005_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_model.{request.param}") client = TestClient(mod.app) return client def test_read_item_name(client: TestClient): response = client.get("/items/bar/name")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6.5K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial006.py
params=[ pytest.param("tutorial006_py39"), pytest.param("tutorial006_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_model.{request.param}") client = TestClient(mod.app) return client def test_read_item_name(client: TestClient): response = client.get("/items/bar/name")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6.5K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
+ " over " + response.protocol() + ")") : "(cache)"; int responseCode = response.code(); System.out.printf("%03d: %s %s%n", responseCode, url, responseSource); String contentType = response.header("Content-Type"); if (responseCode != 200 || contentType == null) { return; } MediaType mediaType = MediaType.parse(contentType);
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Jul 23 00:58:06 UTC 2025 - 5K bytes - Viewed (0) -
docs/en/docs/tutorial/extra-models.md
Because we are passing it as a **value to an argument** instead of putting it in a **type annotation**, we have to use `Union` even in Python 3.10. If it was in a type annotation we could have used the vertical bar, as: ```Python some_variable: PlaneItem | CarItem ```
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 6.9K bytes - Viewed (0) -
tests/test_read_with_orm_mode.py
pass class PersonRead(PersonBase): full_name: str model_config = {"from_attributes": True} app = FastAPI() @app.post("/people/", response_model=PersonRead) def create_person(person: PersonCreate) -> Any: db_person = Person.model_validate(person) return db_person client = TestClient(app)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_05.py
pytest.param("tutorial003_05_py39"), pytest.param("tutorial003_05_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_model.{request.param}") client = TestClient(mod.app) return client def test_get_portal(client: TestClient): response = client.get("/portal") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.8K bytes - Viewed (0) -
tests/test_pydanticv2_dataclasses_uuid_stringified_annotations.py
name: str price: float tags: list[str] = field(default_factory=list) description: Union[str, None] = None tax: Union[float, None] = None app = FastAPI() @app.get("/item", response_model=Item) async def read_item(): return { "id": uuid.uuid4(), "name": "Island In The Moon", "price": 12.99, "description": "A place to be be playin' and havin' fun",Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.1K bytes - Viewed (0)