Changelog
All notable changes to this project are documented here. The format follows Keep a Changelog, and the project uses Semantic Versioning.
0.1.0 - 2026-11-11
First public release.
Added
build(cls, seed=..., **overrides)creates one object filled with test data. Works with dataclasses, plain classes (fields read from__init__type hints) and, with thepydanticextra, Pydantic v2 models.build_many(cls, n, seed=...)createsndifferent objects; the same seed gives the same list.register(type, fn)adds a generator for a custom type, andreset_registry()restores the defaults.- Supported types:
int,float,bool,str,bytes,Decimal,UUID,datetime,date,time,timedelta,Enum,Literal,list,set,dict,tuple,OptionalandUnion, nested classes, and self-referencing classes (stopped at depth 3). - Realistic
strvalues for fields namedemail,name,first_name,last_name,city,country,url,phone,username,title,descriptionandslug. - Pydantic
Fieldconstraints:ge,gt,le,lt,min_length,max_lengthand basicpatternregexes. - Error classes
PolarFactoryErrorandGenerationErrorinpolarfactory.errors. Both subclassTypeError, and every message says how to fix the problem.