- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 831 for str (0.04 sec)
-
docs/zh/docs/tutorial/query-params-str-validations.md
``` 由于我们必须用 `Query(default=None)` 替换默认值 `None`,`Query` 的第一个参数同样也是用于定义默认值。 所以: ```Python q: Union[str, None] = Query(default=None) ``` ...使得参数可选,等同于: ```Python q: str = None ``` 但是 `Query` 显式地将其声明为查询参数。 然后,我们可以将更多的参数传递给 `Query`。在本例中,适用于字符串的 `max_length` 参数: ```Python q: Union[str, None] = Query(default=None, max_length=50) ``` 将会校验数据,在数据无效时展示清晰的错误信息,并在 OpenAPI 模式的*路径操作*中记录该参数。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.2K bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params-str-validations.md
Le paramètre de requête `q` a pour type `Union[str, None]` (ou `str | None` en Python 3.10), signifiant qu'il est de type `str` mais pourrait aussi être égal à `None`, et bien sûr, la valeur par défaut est `None`, donc **FastAPI** saura qu'il n'est pas requis. /// note **FastAPI** saura que la valeur de `q` n'est pas requise grâce à la valeur par défaut `= None`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 17:14:38 UTC 2024 - 9.5K bytes - Viewed (0) -
docs/ko/docs/tutorial/query-params-str-validations.md
```Python hl_lines="9" {!../../docs_src/query_params_str_validations/tutorial001.py!} ``` 쿼리 매개변수 `q`는 `Optional[str]` 자료형입니다. 즉, `str` 자료형이지만 `None` 역시 될 수 있음을 뜻하고, 실제로 기본값은 `None`이기 때문에 FastAPI는 이 매개변수가 필수가 아니라는 것을 압니다. /// note | "참고" FastAPI는 `q`의 기본값이 `= None`이기 때문에 필수가 아님을 압니다. `Optional[str]`에 있는 `Optional`은 FastAPI가 사용하는게 아니지만, 편집기에게 더 나은 지원과 오류 탐지를 제공하게 해줍니다. /// ## 추가 검증
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.5K bytes - Viewed (0) -
docs/pt/docs/tutorial/query-params-str-validations.md
``` O parâmetro de consulta `q` é do tipo `Union[str, None]`, o que significa que é do tipo `str` mas que também pode ser `None`, e de fato, o valor padrão é `None`, então o FastAPI saberá que não é obrigatório. /// note | "Observação" O FastAPI saberá que o valor de `q` não é obrigatório por causa do valor padrão `= None`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.3K bytes - Viewed (0) -
tests/test_dependency_class.py
class MethodsDependency: def synchronous(self, value: str) -> str: return value async def asynchronous(self, value: str) -> str: return value def synchronous_gen(self, value: str) -> Generator[str, None, None]: yield value async def asynchronous_gen(self, value: str) -> AsyncGenerator[str, None]: yield value callable_dependency = CallableDependency()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 09 10:54:05 UTC 2020 - 3.3K bytes - Viewed (0) -
fastapi/dependencies/models.py
name: Optional[str] = None call: Optional[Callable[..., Any]] = None request_param_name: Optional[str] = None websocket_param_name: Optional[str] = None http_connection_param_name: Optional[str] = None response_param_name: Optional[str] = None background_tasks_param_name: Optional[str] = None security_scopes_param_name: Optional[str] = None security_scopes: Optional[List[str]] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 31 20:19:30 UTC 2024 - 1.5K bytes - Viewed (0) -
docs_src/security/tutorial004_py310.py
} } class Token(BaseModel): access_token: str token_type: str class TokenData(BaseModel): username: str | None = None class User(BaseModel): username: str email: str | None = None full_name: str | None = None disabled: bool | None = None class UserInDB(User): hashed_password: str pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/AsciiTest.java
assertFalse(str, c == Ascii.toUpperCase(c)); assertTrue(str, Ascii.isLowerCase(c)); assertFalse(str, Ascii.isUpperCase(c)); } } public void testCharsUpper() { for (char c : UPPER.toCharArray()) { String str = String.valueOf(c); assertFalse(str, c == Ascii.toLowerCase(c)); assertTrue(str, c == Ascii.toUpperCase(c)); assertFalse(str, Ascii.isLowerCase(c));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 5.4K bytes - Viewed (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
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java
} String str = builder.toString(); HashCode hashUtf8 = murmur3_32().hashBytes(str.getBytes(UTF_8)); assertEquals(hashUtf8, murmur3_32().newHasher().putBytes(str.getBytes(UTF_8)).hash()); assertEquals(hashUtf8, murmur3_32().hashString(str, UTF_8)); assertEquals(hashUtf8, murmur3_32().newHasher().putString(str, UTF_8).hash());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:29:46 UTC 2024 - 8.3K bytes - Viewed (0)