polyfactory: Stop Hand-Writing Test Fixtures, Let Type Hints Do It
polyfactory generates test data automatically from Python type hints. Supports dataclasses, Pydantic v2, TypedDict, and msgspec. Pair it with pytest fixtures to eliminate the boilerplate of hand-cr...

Source: DEV Community
polyfactory generates test data automatically from Python type hints. Supports dataclasses, Pydantic v2, TypedDict, and msgspec. Pair it with pytest fixtures to eliminate the boilerplate of hand-crafting fake objects for every test.