- Sort Score
- Num 10 results
- Language All
Results 1081 - 1090 of 1,463 for exemplo (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/zh/docs/advanced/async-tests.md
`TestClient` 在内部通过一些“魔法”操作,使得您可以在普通的 `def` 测试函数中调用异步的 FastAPI 应用程序,并使用标准的 pytest。但当我们在异步函数中使用它时,这种“魔法”就不再生效了。由于测试以异步方式运行,我们无法在测试函数中继续使用 `TestClient`。 `TestClient` 是基于 [HTTPX](https://www.python-httpx.org) 的。幸运的是,我们可以直接使用它来测试 API。 ## 示例 { #example } 举个简单的例子,让我们来看一个与[更大的应用](../tutorial/bigger-applications.md)和[测试](../tutorial/testing.md)中描述的类似文件结构: ``` . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ``` 文件 `main.py` 将包含:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 3.9K bytes - Click Count (0) -
docs/en/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
In some cases, it's even possible to have both Pydantic v1 and v2 models in the same **path operation** in your FastAPI app: {* ../../docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py hl[2:3,6,12,21:22] *} In this example above, the input model is a Pydantic v1 model, and the output model (defined in `response_model=ItemV2`) is a Pydantic v2 model. ### Pydantic v1 parameters { #pydantic-v1-parameters }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 5.4K bytes - Click Count (0) -
android/guava/src/com/google/common/base/Predicates.java
* * <p><b>Warning:</b> contrary to the typical assumptions about predicates (as documented at * {@link Predicate#apply}), the returned predicate may not be <i>consistent with equals</i>. For * example, {@code instanceOf(ArrayList.class)} will yield different results for the two equal * instances {@code Lists.newArrayList(1)} and {@code Arrays.asList(1)}. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 16:16:42 GMT 2026 - 26.6K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheControlJvmTest.kt
assertThat(cacheControl.noTransform).isTrue() assertThat(cacheControl.toString()).isEqualTo(header) } @Test @Throws(Exception::class) fun parseIgnoreCacheControlExtensions() { // Example from http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.6 val header = "private, community=\"UCI\"" val cacheControl = parse( Headers .Builder()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 7.4K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ForwardingSortedSet.java
* <a href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>. * * <p><b>Warning:</b> The methods of {@code ForwardingSortedSet} forward <i>indiscriminately</i> to * the methods of the delegate. For example, overriding {@link #add} alone <i>will not</i> change * the behavior of {@link #addAll}, which can lead to unexpected behavior. In this case, you should
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Feb 12 16:28:01 GMT 2025 - 5.7K bytes - Click Count (0) -
android/guava/src/com/google/common/escape/Escaper.java
* (such as an XML document). Typically (but not always), the inverse process of "unescaping" the * text is performed automatically by the relevant parser. * * <p>For example, an XML escaper would convert the literal string {@code "Foo<Bar>"} into {@code * "Foo<Bar>"} to prevent {@code "<Bar>"} from being confused with an XML tag. When the
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Feb 13 15:45:16 GMT 2025 - 4.7K bytes - Click Count (0) -
docs/tr/docs/tutorial/testing.md
{* ../../docs_src/app_testing/app_a_py310/test_main.py hl[3] *} ...ve test kodunu da öncekiyle aynı şekilde yazabilirsiniz. ## Test Etme: Genişletilmiş Örnek { #testing-extended-example } Şimdi bu örneği genişletelim ve farklı parçaların nasıl test edildiğini görmek için daha fazla detay ekleyelim. ### Genişletilmiş **FastAPI** Uygulama Dosyası { #extended-fastapi-app-file }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 6.3K bytes - Click Count (0) -
docs/zh/docs/advanced/middleware.md
## `TrustedHostMiddleware` { #trustedhostmiddleware } 强制所有传入请求都必须正确设置 `Host` 请求头,以防 HTTP 主机头攻击。 {* ../../docs_src/advanced_middleware/tutorial002_py310.py hl[2,6:8] *} 支持以下参数: * `allowed_hosts` - 允许的域名(主机名)列表。`*.example.com` 等通配符域名可以匹配子域名。若要允许任意主机名,可使用 `allowed_hosts=["*"]` 或省略此中间件。 * `www_redirect` - 若设置为 `True`,对允许主机的非 www 版本的请求将被重定向到其 www 版本。默认为 `True`。 如果传入的请求没有通过验证,则发送 `400` 响应。 ## `GZipMiddleware` { #gzipmiddleware }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 3.7K bytes - Click Count (0) -
cmd/dummy-data-generator_test.go
// to compare such streams of bytes that may be split up, because: // // Given the function: // // f := func(r io.Reader) string { // b, _ := io.ReadAll(r) // return string(b) // } // // for example, the following is true: // // f(NewDummyDataGen(100, 0)) == f(NewDummyDataGen(50, 0)) + f(NewDummyDataGen(50, 50)) func NewDummyDataGen(totalLength, skipOffset int64) io.ReadSeeker { if totalLength < 0 {
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 4.8K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/suggest/normalizer/HankakuKanaToZenkakuKana.java
* <li>Conversion of individual Hankaku Kana characters to Zenkaku Kana characters.</li> * <li>Handling of voiced (゙) and semi-voiced (゚) sound marks to produce the correct Zenkaku Kana characters.</li> * </ul> * * <p>Example usage:</p> * <pre> * {@code * HankakuKanaToZenkakuKana normalizer = new HankakuKanaToZenkakuKana(); * String normalized = normalizer.normalize("ガギグゲゴ", "field"); * System.out.println(normalized); // Outputs: ガギグゲゴ
Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Mon Nov 17 14:23:01 GMT 2025 - 6.8K bytes - Click Count (1)