polyfactory icon indicating copy to clipboard operation
polyfactory copied to clipboard

feat: support pydantic by_name

Open adhtruong opened this issue 1 month ago • 1 comments

Description

  • This adds support to use BaseModel.model_validate(..., by_name). This unblocks use cases where the model names are not valid python identifiers
  • Set to False for backwards compatibility but may want to change this to true in future major release

Closes

  • Closes https://github.com/litestar-org/polyfactory/issues/713
  • Closes https://github.com/litestar-org/polyfactory/issues/746

adhtruong avatar Nov 15 '25 12:11 adhtruong