- Sort Score
- Num 10 results
- Language All
Results 131 - 140 of 1,705 for nonce (0.1 seconds)
-
tests/test_request_params/test_body/test_optional_str.py
# Without aliases @app.post("/optional-str", operation_id="optional_str") async def read_optional_str(p: Annotated[str | None, Body(embed=True)] = None): return {"p": p} class BodyModelOptionalStr(BaseModel): p: str | None = None @app.post("/model-optional-str", operation_id="model_optional_str") async def read_model_optional_str(p: BodyModelOptionalStr): return {"p": p.p}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 11.5K bytes - Click Count (0) -
tests/benchmarks/test_general_performance.py
status_code, body = _bench_post_json( benchmark, client, "/sync/validated", json={"name": "foo", "value": 123}, ) assert status_code == 200 assert body == b'{"name":"foo","value":123,"dep":42}' def test_sync_return_dict_without_response_model(benchmark, client: TestClient) -> None:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 20:40:26 GMT 2025 - 11.1K bytes - Click Count (0) -
fastapi/applications.py
summary: str | None = None, description: str | None = None, response_description: str = "Successful Response", responses: dict[int | str, dict[str, Any]] | None = None, deprecated: bool | None = None, methods: list[str] | None = None, operation_id: str | None = None, response_model_include: IncEx | None = None,Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Apr 01 16:16:24 GMT 2026 - 178.6K bytes - Click Count (0) -
tests/test_security_oauth2_optional.py
def get_current_user(oauth_header: str | None = Security(reusable_oauth2)): if oauth_header is None: return None user = User(username=oauth_header) return user @app.post("/login") def login(form_data: OAuth2PasswordRequestFormStrict = Depends()): return form_data @app.get("/users/me") def read_users_me(current_user: User | None = Depends(get_current_user)): if current_user is None:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 9.8K bytes - Click Count (0) -
docs_src/security/tutorial005_py310.py
class Token(BaseModel): access_token: str token_type: str class TokenData(BaseModel): username: str | None = None scopes: list[str] = [] class User(BaseModel): username: str email: str | None = None full_name: str | None = None disabled: bool | None = None class UserInDB(User): hashed_password: str password_hash = PasswordHash.recommended()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 5.3K bytes - Click Count (0) -
docs/uk/docs/tutorial/query-params-str-validations.md
Раніше ми мали таку анотацію типу: ```Python q: str | None = None ``` Тепер ми загорнемо її у `Annotated`, і отримаємо: ```Python q: Annotated[str | None] = None ``` Обидві ці версії означають одне й те саме: `q` — це параметр, який може бути `str` або `None`, і за замовчуванням має значення `None`. А тепер переходимо до цікавого! 🎉
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 25.9K bytes - Click Count (0) -
fastapi/exceptions.py
*, body: Any = None, endpoint_ctx: EndpointContext | None = None, ) -> None: super().__init__(errors, endpoint_ctx=endpoint_ctx) self.body = body class WebSocketRequestValidationError(ValidationException): def __init__( self, errors: Sequence[Any], *, endpoint_ctx: EndpointContext | None = None, ) -> None:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:41:21 GMT 2026 - 7.3K bytes - Click Count (0) -
tests/test_request_params/test_query/test_optional_str.py
# ===================================================================================== # Without aliases @app.get("/optional-str") async def read_optional_str(p: str | None = None): return {"p": p} class QueryModelOptionalStr(BaseModel): p: str | None = None @app.get("/model-optional-str") async def read_model_optional_str(p: Annotated[QueryModelOptionalStr, Query()]): return {"p": p.p}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 8.4K bytes - Click Count (0) -
docs/metrics/prometheus/grafana/replication/minio-replication-node.json
"axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear",
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Mon Aug 04 01:46:49 GMT 2025 - 57.5K bytes - Click Count (0) -
tests/test_request_params/test_query/test_required_str.py
assert response.json() == { "detail": [ { "type": "missing", "loc": ["query", "p"], "msg": "Field required", "input": IsOneOf(None, {}), } ] } @pytest.mark.parametrize( "path", ["/required-str", "/model-required-str"], ) def test_required_str(path: str): client = TestClient(app)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 10.2K bytes - Click Count (0)