- Sort Score
- Num 10 results
- Language All
Results 511 - 520 of 6,333 for retain (0.06 seconds)
-
tests/test_filter_pydantic_sub_model_pv2.py
raise ValueError("name must end in A") return name async def get_model_c() -> ModelC: return ModelC(username="test-user", password="test-password") @app.get("/model/{name}", response_model=ModelA) async def get_model_a(name: str, model_c=Depends(get_model_c)): return { "name": name, "description": "model-a-desc",
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 6.7K bytes - Click Count (0) -
tests/test_tutorial/test_body/test_tutorial004.py
"title": "HTTPValidationError", "type": "object", "properties": { "detail": { "title": "Detail", "type": "array", "items": { "$ref": "#/components/schemas/ValidationError"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 6.6K bytes - Click Count (0) -
docs/de/docs/tutorial/handling-errors.md
```JSON { "detail": "Item not found" } ``` /// tip | Tipp Wenn Sie eine `HTTPException` auslösen, können Sie dem Parameter `detail` jeden Wert übergeben, der in JSON konvertiert werden kann, nicht nur `str`. Sie könnten ein `dict`, eine `list`, usw. übergeben.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 10.3K bytes - Click Count (0) -
docs_src/sql_databases/tutorial001_py310.py
raise HTTPException(status_code=404, detail="Hero not found") return hero @app.delete("/heroes/{hero_id}") def delete_hero(hero_id: int, session: Session = Depends(get_session)): hero = session.get(Hero, hero_id) if not hero: raise HTTPException(status_code=404, detail="Hero not found") session.delete(hero) session.commit()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Oct 09 19:44:42 GMT 2024 - 1.7K bytes - Click Count (0) -
tests/test_param_include_in_schema.py
): return {"hidden_cookie": hidden_cookie} @app.get("/hidden_header") async def hidden_header( hidden_header: str | None = Header(default=None, include_in_schema=False), ): return {"hidden_header": hidden_header} @app.get("/hidden_path/{hidden_path}") async def hidden_path(hidden_path: str = Path(include_in_schema=False)): return {"hidden_path": hidden_path}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 8.6K bytes - Click Count (0) -
docs_src/bigger_applications/app_an_py310/routers/items.py
fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}} @router.get("/") async def read_items(): return fake_items_db @router.get("/{item_id}") async def read_item(item_id: str): if item_id not in fake_items_db: raise HTTPException(status_code=404, detail="Item not found") return {"name": fake_items_db[item_id]["name"], "item_id": item_id} @router.put( "/{item_id}", tags=["custom"],Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1011 bytes - Click Count (0) -
tests/test_regex_deprecated_params.py
async def read_items( q: Annotated[str | None, Query(regex="^fixedquery$")] = None, ): if q: return f"Hello {q}" else: return "Hello World" client = TestClient(app) return client @needs_py310 def test_query_params_str_validations_no_query(): client = get_client() response = client.get("/items/")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 5.1K bytes - Click Count (0) -
tests/test_security_http_basic_optional.py
security = HTTPBasic(auto_error=False) @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials | None = Security(security)): if credentials is None: return {"msg": "Create an account first"} return {"username": credentials.username, "password": credentials.password} client = TestClient(app) def test_security_http_basic():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.7K bytes - Click Count (0) -
docs/fr/docs/tutorial/handling-errors.md
```JSON { "detail": "Item not found" } ``` /// tip | Astuce Lorsque vous levez une `HTTPException`, vous pouvez passer n'importe quelle valeur convertible en JSON comme paramètre `detail`, pas uniquement un `str`. Vous pouvez passer un `dict`, une `list`, etc.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 10K bytes - Click Count (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ObjectBasedValueSource.java
* Finally, return the result of the last expression part's resolution.</p> * * <p><b>NOTE:</b> The object-graph navigation actually takes place via the * {@link ReflectionValueExtractor} class.</p> */ @Override public Object getValue(String expression) { if (expression == null || expression.trim().isEmpty()) { return null; } try {
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Jun 06 14:28:57 GMT 2025 - 3.4K bytes - Click Count (0)