Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for dump_python (0.07 sec)

  1. tests/test_arbitrary_types.py

        ]
    
        class MyModel(BaseModel):
            model_config = ConfigDict(arbitrary_types_allowed=True)
            custom_field: FakeNumpyArrayPydantic
    
        ta = TypeAdapter(MyModel)
        assert ta.dump_python(MyModel(custom_field=FakeNumpyArray())) == {
            "custom_field": [1.0, 2.0, 3.0]
        }
        assert ta.json_schema() == snapshot(
            {
                "properties": {
                    "custom_field": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  2. fastapi/_compat/v2.py

            exclude_none: bool = False,
        ) -> Any:
            # What calls this code passes a value that already called
            # self._type_adapter.validate_python(value)
            return self._type_adapter.dump_python(
                value,
                mode=mode,
                include=include,
                exclude=exclude,
                by_alias=by_alias,
                exclude_unset=exclude_unset,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
Back to top