#9805·pydantic

Support `from_attributes` in `TypeAdapter.validate_python()` with Pydantic `dataclass`

Author: Arseniy-PopovCreated Jul 1, 2024Updated Sep 17, 2026
Labelsfeature request

Initial Checks

  • I have searched Google & GitHub for similar requests and couldn't find anything
  • I have read and followed the docs and still think this feature is missing

Description

The note says that

When using TypeAdapter with a Pydantic dataclass, the use of the from_attributes argument is not supported.

but creating dataclasses from arbitrary types, e.g. SQLAlchemy models, would be useful.

Affected Components