- Sort Score
- Result 10 results
- Languages All
Results 171 - 180 of 1,085 for tstr (0.02 sec)
-
docs_src/response_model/tutorial006_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: float = 10.5 items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2}, "baz": { "name": "Baz",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 848 bytes - Viewed (0) -
src/main/java/jcifs/util/ServerResponseValidator.java
*/ private String sanitizeForLog(String str) { if (str == null) { return "null"; } // Truncate long strings if (str.length() > 100) { str = str.substring(0, 100) + "..."; } // Remove control characters return str.replaceAll("[\\x00-\\x1F\\x7F]", "?"); } /**Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 16.6K bytes - Viewed (0) -
docs_src/sql_databases/tutorial002_py39.py
class HeroBase(SQLModel): name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) class Hero(HeroBase, table=True): id: Union[int, None] = Field(default=None, primary_key=True) secret_name: str class HeroPublic(HeroBase): id: int class HeroCreate(HeroBase): secret_name: str class HeroUpdate(HeroBase):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 2.6K bytes - Viewed (0) -
docs/es/docs/tutorial/dependencies/sub-dependencies.md
```Python hl_lines="1" async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.9+ sin Anotaciones /// tip | Consejo Prefiere usar la versión `Annotated` si es posible. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_allow_inf_nan_in_enforcing.py
b: Annotated[float, Body(allow_inf_nan=False)] = 0, ) -> str: return "OK" client = TestClient(app) @pytest.mark.parametrize( "value,code", [ ("-1", 200), ("inf", 200), ("-inf", 200), ("nan", 200), ("0", 200), ("342", 200), ], ) def test_allow_inf_nan_param_true(value: str, code: int): response = client.post(f"/?x={value}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_request_params/test_query/test_optional_str.py
@pytest.mark.parametrize( "path", ["/optional-str", "/model-optional-str"], ) def test_optional_str_missing(path: str): client = TestClient(app) response = client.get(path) assert response.status_code == 200 assert response.json() == {"p": None} @pytest.mark.parametrize( "path", ["/optional-str", "/model-optional-str"], ) def test_optional_str(path: str): client = TestClient(app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/extra-data-types.md
到目前为止,您一直在使用常见的数据类型,如: * `int` * `float` * `str` * `bool` 但是您也可以使用更复杂的数据类型。 您仍然会拥有现在已经看到的相同的特性: * 很棒的编辑器支持。 * 传入请求的数据转换。 * 响应数据转换。 * 数据验证。 * 自动补全和文档。 ## 其他数据类型 下面是一些你可以使用的其他数据类型: * `UUID`: * 一种标准的 "通用唯一标识符" ,在许多数据库和系统中用作ID。 * 在请求和响应中将以 `str` 表示。 * `datetime.datetime`: * 一个 Python `datetime.datetime`. * 在请求和响应中将表示为 ISO 8601 格式的 `str` ,比如: `2008-09-15T15:53:00+05:00`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 2.5K bytes - Viewed (0) -
internal/store/store_test.go
} } } func TestParseKey(t *testing.T) { testCases := []struct { str string expectedKey Key }{ { str: "01894394-d046-4783-ba0d-f1c6885790dc.event", expectedKey: Key{ Name: "01894394-d046-4783-ba0d-f1c6885790dc", Extension: ".event", ItemCount: 1, }, }, { str: "100:01894394-d046-4783-ba0d-f1c6885790dc.event.snappy", expectedKey: Key{
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 4K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/SerializeUtilTest.java
* @throws Exception */ public void testFromBinaryToObject_DefaultFilter_AllowsSafeClasses() throws Exception { // Test String final String str = "test string"; byte[] binary = SerializeUtil.fromObjectToBinary(str); assertEquals(str, SerializeUtil.fromBinaryToObject(binary)); // Test Integer final Integer num = 42; binary = SerializeUtil.fromObjectToBinary(num);Registered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Sat Nov 22 11:21:59 UTC 2025 - 7.6K bytes - Viewed (0) -
fastapi/security/utils.py
from typing import Optional def get_authorization_scheme_param( authorization_header_value: Optional[str], ) -> tuple[str, str]: if not authorization_header_value: return "", "" scheme, _, param = authorization_header_value.partition(" ")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 286 bytes - Viewed (0)