PolyFactory
Mock data generation library for Python classes and Pydantic models.
Pricing
Free tier
Flat rate
Adoption
→StableLicense
Open Source
Data freshness
Aging · Jun 8, 2026Overview
What is PolyFactory?
PolyFactory is a powerful mock data generation library that supports Python classes and Pydantic models, making it easier to generate test data for development and testing purposes. It continues the legacy of `pydantic-factories` with enhanced features and support.
Key differentiator
“PolyFactory stands out by offering robust support for Python classes and Pydantic models, making it an ideal choice for developers who need precise control over their test data generation.”
Capability profile
Capability Radar
Honest assessment
Strengths & Weaknesses
↑ Strengths
↓ Weaknesses
API requires Python-specific patterns, TypeScript SDK is community-maintained
v0.1 to v0.2 migration required rewriting chain definitions
Difficulties in generating mock data for nested and recursive models
Few community contributions and plugins compared to more established libraries like Faker
Fit analysis
Who is it for?
✓ Best for
Developers working with Pydantic models who need to generate consistent and realistic test data
Teams building Python applications that require extensive testing and validation
Projects where manual data creation is time-consuming or impractical
✕ Not a fit for
Applications requiring real-time data generation (PolyFactory focuses on static mock data)
Scenarios where the generated data needs to be highly customized beyond what PolyFactory offers out-of-the-box
Cost structure
Pricing
Free Tier
Available
Open source — free to use
Starts at
$0
Model
Flat rate
Enterprise
None
Performance benchmarks
How Fast Is It?
Ecosystem
Relationships
Alternatives
Works well with
Next step
Get Started with PolyFactory
Step-by-step setup guide with code examples and common gotchas.