Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 381 - 390 of 993 for asdict (0.05 seconds)

  1. fastapi/types.py

    from pydantic import BaseModel
    
    DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any])
    UnionType = getattr(types, "UnionType", Union)
    ModelNameMap = dict[Union[type[BaseModel], type[Enum]], str]
    IncEx = Union[set[int], set[str], dict[int, Any], dict[str, Any]]
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 455 bytes
    - Click Count (0)
  2. fastapi/dependencies/utils.py

        return values
    
    
    async def request_body_to_args(
        body_fields: list[ModelField],
        received_body: Optional[Union[dict[str, Any], FormData]],
        embed_body_fields: bool,
    ) -> tuple[dict[str, Any], list[dict[str, Any]]]:
        values: dict[str, Any] = {}
        errors: list[dict[str, Any]] = []
        assert body_fields, "request_body_to_args() should be called with fields"
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 37.6K bytes
    - Click Count (3)
  3. api/maven-api-spi/src/main/java/org/apache/maven/api/spi/PackagingProvider.java

     * <p>
     * Example usage:
     * <pre>
     * public class CustomPackagingProvider implements PackagingProvider {
     *     public Collection&lt;Packaging&gt; provides() {
     *         return Arrays.asList(
     *             packaging("docker-image"),
     *             packaging("flatpak")
     *         );
     *     }
     * }
     * </pre>
     *
     * @see org.apache.maven.api.Packaging
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Thu Apr 03 13:33:59 GMT 2025
    - 2K bytes
    - Click Count (0)
  4. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        val request = server.takeRequest()
        assertThat(request.body.readUtf8()).isEqualTo("request")
      }
    
      @Test
      fun testH2PriorKnowledgeServerFallback() {
        try {
          server.protocols = Arrays.asList(Protocol.H2_PRIOR_KNOWLEDGE, Protocol.HTTP_1_1)
          fail<Any>()
        } catch (expected: IllegalArgumentException) {
          assertThat(expected.message).isEqualTo(
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Thu Jul 03 13:16:34 GMT 2025
    - 22.3K bytes
    - Click Count (0)
  5. compat/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolutionExceptionTest.java

            String version = "aVersion";
            String type = "jar";
            String classifier = "aClassifier";
            String downloadUrl = "http://somewhere.com/download";
            List<String> path = Arrays.asList("dependency1", "dependency2");
            String expected = "Missing artifact" + LS + LS + "  Try downloading the file manually from: " + LS
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 2.7K bytes
    - Click Count (0)
  6. docs/zh/docs/tutorial/body-updates.md

    ### 使用 Pydantic 的 `exclude_unset` 参数
    
    更新部分数据时,可以在 Pydantic 模型的 `.dict()` 中使用 `exclude_unset` 参数。
    
    比如,`item.dict(exclude_unset=True)`。
    
    这段代码生成的 `dict` 只包含创建 `item` 模型时显式设置的数据,而不包括默认值。
    
    然后再用它生成一个只含已设置(在请求中所发送)数据,且省略了默认值的 `dict`:
    
    {* ../../docs_src/body_updates/tutorial002.py hl[34] *}
    
    ### 使用 Pydantic 的 `update` 参数
    
    接下来,用 `.copy()` 为已有模型创建调用 `update` 参数的副本,该参数为包含更新数据的 `dict`。
    
    例如,`stored_item_model.copy(update=update_data)`:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 3.5K bytes
    - Click Count (0)
  7. build-logic/documentation/src/main/groovy/gradlebuild/docs/ServeDocs.java

                builder.getMainModule().set("jdk.httpserver");
                builder.setStandardOutput(System.out);
                builder.setErrorOutput(System.err);
                builder.setArgs(Arrays.asList("-p", getPort().get(), "-d", getDocsDirectory().get().getAsFile().getAbsolutePath()));
                registry.start(getPath(), DeploymentRegistry.ChangeBehavior.RESTART, JavaApplicationHandle.class, builder);
            }
        }
    
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Thu Apr 18 12:38:47 GMT 2024
    - 2.9K bytes
    - Click Count (0)
  8. docs/ru/docs/tutorial/encoder.md

    Точно так же эта база данных не может принять Pydantic-модель (объект с атрибутами), а только `dict`.
    
    Для этого можно использовать функцию `jsonable_encoder`.
    
    Она принимает объект, например, Pydantic-модель, и возвращает его версию, совместимую с JSON:
    
    {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *}
    
    В данном примере она преобразует Pydantic-модель в `dict`, а `datetime` - в `str`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 30 11:24:39 GMT 2025
    - 2.7K bytes
    - Click Count (0)
  9. compat/maven-builder-support/src/main/java/org/apache/maven/building/Source.java

        InputStream getInputStream() throws IOException;
    
        /**
         * Provides a user-friendly hint about the location of the source. This could be a local file path, a URI or just an
         * empty string. The intention is to assist users during error reporting.
         *
         * @return A user-friendly hint about the location of the source, never {@code null}.
         */
        String getLocation();
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Jan 15 18:51:29 GMT 2025
    - 1.8K bytes
    - Click Count (0)
  10. docs/en/docs/tutorial/encoder.md

    The same way, this database wouldn't receive a Pydantic model (an object with attributes), only a `dict`.
    
    You can use `jsonable_encoder` for that.
    
    It receives an object, like a Pydantic model, and returns a JSON compatible version:
    
    {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *}
    
    In this example, it would convert the Pydantic model to a `dict`, and the `datetime` to a `str`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 09:15:41 GMT 2025
    - 1.7K bytes
    - Click Count (0)
Back to Top