- Sort Score
- Result 10 results
- Languages All
Results 351 - 360 of 1,835 for none (0.03 sec)
-
docs/ru/docs/tutorial/body-multiple-params.md
Поскольку по умолчанию, отдельные значения интерпретируются как query-параметры, вам не нужно явно добавлять `Query`, вы можете просто сделать так: ```Python q: Union[str, None] = None ``` Или в Python 3.10 и выше: ```Python q: str | None = None ``` Например: //// tab | Python 3.10+ ```Python hl_lines="27" {!> ../../docs_src/body_multiple_params/tutorial004_an_py310.py!} ``` ////
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.6K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_param_models/test_tutorial001.py
c.cookies.set("session_id", "123") response = c.get("/items/") assert response.status_code == 200 assert response.json() == { "session_id": "123", "fatebook_tracker": None, "googall_tracker": None, } def test_cookie_param_model_invalid(client: TestClient): response = client.get("/items/") assert response.status_code == 422 assert response.json() == snapshot(
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 7.4K bytes - Viewed (0) -
docs_src/header_params/tutorial002_an.py
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 317 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial011_an.py
from typing import List, Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(q: Annotated[Union[List[str], None], Query()] = None): query_items = {"q": q}
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 272 bytes - Viewed (0) -
tests/test_security_openid_connect_optional.py
username: str def get_current_user(oauth_header: Optional[str] = Security(oid)): if oauth_header is None: return None user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: Optional[User] = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} return current_user client = TestClient(app)
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (1) -
docs_src/query_params_str_validations/tutorial007_py310.py
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 304 bytes - Viewed (0) -
docs/em/docs/tutorial/response-model.md
//// //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛 ```Python hl_lines="9 11-12" {!> ../../docs_src/response_model/tutorial004_py310.py!} ``` //// * `description: Union[str, None] = None` (⚖️ `str | None = None` 🐍 3️⃣.1️⃣0️⃣) ✔️ 🔢 `None`. * `tax: float = 10.5` ✔️ 🔢 `10.5`. * `tags: List[str] = []` 🔢 🛁 📇: `[]`. ✋️ 👆 💪 💚 🚫 👫 ⚪️➡️ 🏁 🚥 👫 🚫 🤙 🏪.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 15.8K bytes - Viewed (0) -
docs_src/header_params/tutorial001_py310.py
from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: str | None = Header(default=None)):
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 182 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial002_an_py310.py
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 309 bytes - Viewed (0) -
docs_src/query_params/tutorial006b.py
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 301 bytes - Viewed (0)