- Sort Score
- Result 10 results
- Languages All
Results 2001 - 2010 of 3,066 for Gist (0.02 sec)
-
docs_src/body_updates/tutorial001_py310.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str | None = None description: str | None = None price: float | None = None tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 856 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial015_an_py39.py
@app.get("/items/") async def read_items( id: Annotated[Union[str, None], AfterValidator(check_valid_id)] = None, ): if id: item = data.get(id) else: id, item = random.choice(list(data.items()))
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 01 22:02:35 UTC 2025 - 781 bytes - Viewed (0) -
docs_src/header_param_models/tutorial001_py310.py
from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): host: str save_data: bool if_modified_since: str | None = None traceparent: str | None = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: CommonHeaders = Header()):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 352 bytes - Viewed (0) -
src/main/java/org/codelibs/curl/CurlRequest.java
Registered: Sat Dec 20 09:13:53 UTC 2025 - Last Modified: Mon Nov 24 03:10:07 UTC 2025 - 18.6K bytes - Viewed (0) -
docs/zh/docs/python-types.md
### 嵌套类型 有些容器数据结构可以包含其他的值,比如 `dict`、`list`、`set` 和 `tuple`。它们内部的值也会拥有自己的类型。 你可以使用 Python 的 `typing` 标准库来声明这些类型以及子类型。 它专门用来支持这些类型提示。 #### 列表 例如,让我们来定义一个由 `str` 组成的 `list` 变量。 从 `typing` 模块导入 `List`(注意是大写的 `L`): {* ../../docs_src/python_types/tutorial006.py hl[1] *} 同样以冒号(`:`)来声明这个变量。 输入 `List` 作为类型。 由于列表是带有"子类型"的类型,所以我们把子类型放在方括号中:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Aug 18 06:34:40 UTC 2025 - 8.6K bytes - Viewed (0) -
docs/extensions/s3zip/examples/boto3/main.py
def _add_header(request, **kwargs): request.headers.add_header('x-minio-extract', 'true') event_system = s3.meta.events event_system.register_first('before-sign.s3.*', _add_header) # List zip contents response = s3.list_objects_v2(Bucket="your-bucket", Prefix="path/to/file.zip/") print(response) # Download data.csv stored in the zip file
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Wed Aug 04 21:15:45 UTC 2021 - 771 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial001_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: list = [] @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item): results = {"item_id": item_id, "item": item}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 364 bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/DoubleInetAddressDns.kt
* fallbacks to guarantee that a fallback address is available. */ class DoubleInetAddressDns : Dns { override fun lookup(hostname: String): List<InetAddress> { val addresses = Dns.SYSTEM.lookup(hostname) return listOf(addresses[0], addresses[0]) }Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/SocketAdapter.kt
fun matchesSocketFactory(sslSocketFactory: SSLSocketFactory): Boolean = false fun configureTlsExtensions( sslSocket: SSLSocket, hostname: String?, protocols: List<Protocol>, ) fun getSelectedProtocol(sslSocket: SSLSocket): String?
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.2K bytes - Viewed (0) -
src/main/java/jcifs/netbios/NodeStatusResponse.java
private final byte[] macAddress; private byte[] stats; NbtAddress[] addressArray; /* * It is a little awkward but prudent to pass the quering address * so that it may be included in the list of results. IOW we do * not want to create a new NbtAddress object for this particular * address from which the query is constructed, we want to populate * the data of the existing address that should be one of several
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 5.8K bytes - Viewed (0)