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