skillfed

factory-boy

A versatile test fixtures replacement based on thoughtbot's factory_bot for Ruby.

factory-boy Permissive license MIT AGING 3,806 v3.3.3 released

Install

factory-boy on PyPI

pip

pip install factory-boy

uv

uv add factory-boy

poetry

poetry add factory-boy

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — Faker
Maintenance aging — 556 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: factory_boy-3.3.3-py2.py3-none-any.whl

Keywords: factory_boy, factory, fixtures

Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing

About factory-boy

from the package's own PyPI description — quoted content, verbatim

factory_boy

.. image:: https://github.com/FactoryBoy/factory_boy/workflows/Test/badge.svg :target: https://github.com/FactoryBoy/factory_boy/actions?query=workflow%3ATest

.. image:: https://github.com/FactoryBoy/factory_boy/workflows/Check/badge.svg :target: https://github.com/FactoryBoy/factory_boy/actions?query=workflow%3ACheck

.. image:: https://img.shields.io/pypi/v/factory_boy.svg :target: https://factoryboy.readthedocs.io/en/latest/changelog.html :alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/factory_boy.svg :target: https://pypi.org/project/factory-boy/ :alt: Supported Python versions

.. image:: https://img.shields.io/pypi/wheel/factory_boy.svg :target: https://pypi.org/project/factory-boy/ :alt: Wheel status

.. image:: https://img.shields.io/pypi/l/factory_boy.svg :target: https://github.com/FactoryBoy/factory_boy/blob/master/LICENSE :alt: License

factory_boy is a fixtures replacement based on thoughtbot's factory_bot <https://github.com/thoughtbot/factory_bot>_.

As a fixtures replacement tool, it aims to replace static, hard to maintain fixtures with easy-to-use factories for complex...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

factory_boy replaces static test fixtures with declarative factories that generate realistic test objects on demand, supporting multiple ORMs and build strategies.

Low friction install with a single lightweight dependency (Faker). Maintenance status is aging—556 days since last release—but the repository remains active with 3806 stars and unarchived, suggesting stable maturity.

MIT license is permissive and carries no restrictions on commercial or proprietary use, making factory_boy suitable for any project type.

Usage

pip install factory_boy

import factory

class UserFactory(factory.Factory):
    class Meta:
        model = User
    first_name = factory.Faker('first_name')
    last_name = factory.Faker('last_name')

user = UserFactory()

Requires Python 3.8 or later; runtime dependency on Faker for realistic value generation.

Verdict: factory_boy is a stable, Production/Stable testing library with no known vulnerabilities and permissive MIT licensing. Its single dependency on Faker keeps install friction low. The aging maintenance status (556 days since release) reflects maturity rather than neglect—the project remains actively starred and unarchived. Suitable for production test suites.

Needs verification

  • Whether the 556-day release gap reflects deliberate stability maintenance or reduced active development
  • Performance characteristics when generating large batches of complex nested objects
  • Compatibility depth with supported ORMs beyond those listed in classifiers
test fixtures replacementfactory pattern testingmock object generationorm test data buildertest object creationpytest fixture alternativetest data generation

Similar packages