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

Benerator
Free planOpen sourceWebAPILinuxmacOS7.6Free plan - 2
RandomUser
Free planOpen sourceWebAPIExtensionSelf-hosted7.1Free plan - 3

Tonic Fabricate
Free planWebAPISelf-hosted6.8$29 usage-based - 4

Mockaroo
Free planWebAPISelf-hosted6.7From $60 a year - 5

Synthetic Data Vault
Free planAPISelf-hosted6.6From $250 a month - 6
Chance.js
Free planWebAPI6.4Free plan
