Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

factory_boy

factoryboy.readthedocs.io

  • Free plan

What the maker publishes

Audience
It is a fixtures replacement tool for Python tests. source
Build strategies
Factories can build unsaved instances, create saved instances, or return stub objects. source
Community support
The documentation directs users to GitHub Issues and a Google Groups mailing list for questions and suggestions. source
Debugging
Detailed logging is available through the factory logger, and factory.debug() is provided as a debugging helper. source
Distribution
The documentation gives PyPI installation and Git source installation instructions. source
Factory syntax
Factories use a declarative syntax to define attributes for creating Python objects. source
Generated data
factory_boy uses the Faker library to generate realistic random values. source
Generated values
It uses Faker for realistic random values and provides helpers to reseed random values for reproducible tests. source
Inheritance
It supports multiple factories for a class, including inheritance. source
License
The project is distributed under the MIT License. source
ORM integrations
Documented ORM integrations include Django, Mogo, MongoEngine, and SQLAlchemy. source
ORM support
The documentation describes integrations for Django, Mogo, MongoEngine, and SQLAlchemy. source
Purpose
factory_boy replaces static test fixtures with customizable factories for complex objects. source
Python support
The support policy covers active Python versions and PyPy3. source
Related objects
SubFactory creates associated objects and uses the associated factory's strategy. source
Reproducible randomness
The factory.random module provides helpers for managing random seeds. source
SQLAlchemy requirement
SQLAlchemyModelFactory requires a session object configured through sqlalchemy_session or sqlalchemy_session_factory. source
Support channels
The project directs users to GitHub Issues and welcomes questions and suggestions on its mailing list. source
Supported runtimes
The support policy says factory_boy supports active Python versions and PyPy3. source

Checked against the maker's pages on 9 Oct 2026.