Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

factory_boy

Free#19 of 28 in Test Data Generation Tools

factory_boy: An open-source Python library for structured ORM fixtures and related test objects. Ranked #19 of 28 in Test Data Generation Tools by our editors (6.8/10); pricing: Open source; best for python ORM model factories.

6.8/10Editor score
factory_boy6.8 Visit factory_boy

At a glance

  • Editor score
    6.8 / 10
  • Pricing
    Open source
  • Best for
    Python ORM model factories
  • Paid from
    Free
  • Generation modes
    Synthetic
  • Facts checked
    20 Sep 2026
factory_boy screenshot
  • Where it wins

    • Declarative factories support nested and related objects.
    • Build, create, stub, and batch generation strategies.
    • Integrates with Django, MongoEngine, Mogo, SQLAlchemy, and Faker.
  • Where it doesn't

    • Focused on Python application fixtures rather than standalone data generation.
    • Requires self-hosted use within a development environment.
    • Database support centers on selected Python ORM integrations.

Our verdict on factory_boy

factory_boy is an open-source Python library for developers who need repeatable test objects and application fixtures. Instead of maintaining static fixture files, teams define declarative factories for Python objects and customize fields as needed. It is particularly suited to projects using Django, MongoEngine, Mogo, or SQLAlchemy, with support for related objects and foreign-key generation.

Its main strength is the depth of its factory model. Developers can choose build, create, or stub instantiation strategies, generate objects in batches, and compose nested factories with SubFactory. Faker integration adds realistic randomized values, while ORM-specific factory classes can save generated objects through the relevant framework or database session. This makes factory_boy a practical fit for tests that need connected object graphs rather than isolated records.

The trade-off is focus. factory_boy is primarily an application-fixture library, with deployment centered on self-hosted use inside a Python codebase. It fits teams that want programmable, framework-aware test data generation and are comfortable defining factories in code. Teams seeking a standalone platform for broad data operations, hosted workflows, or a wider range of database connectors should choose a different category of tool. For Django and supported Python ORM projects, factory_boy keeps test-object creation close to the models and sessions that consume it.

Your product? Our editors can test factory_boy in depth and publish a review, labelled as paid · from $149/mo →

factory_boy pricing

Plans Open sourceFree Free to use — no paid tier required for the core job.
See plans on factoryboy.readthedocs.io

factory_boy fact sheet

Free planNot verified
Paid fromFree
Generation modesSynthetic
Relational dataYes
API data generationYes
Supported data formatsNot verified
DeploymentSelf-hosted
Generation limitNot verified
Database connectorsDjango ORM, MongoDB, MongoEngine, SQLAlchemy
DeploymentSelf-hosted
SupportCommunity, Docs
Built forSolo, Small business, Mid-market, Enterprise (editorial estimate)
Integrations5 integrations: Django, Mogo, MongoEngine, SQLAlchemy, Faker
PricingOpen source
Websitefactoryboy.readthedocs.io
Facts checked20 Sep 2026

factory_boy integrations

factory_boy lists 5 integrations on its own site.

  • Django
  • Mogo
  • MongoEngine
  • SQLAlchemy
  • Faker

Alternatives to factory_boy

See all factory_boy alternatives →

Used factory_boy? Be the first to review it

The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used factory_boy for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.

Write a reviewTwo minutes · verified accounts only · read by an editor before it appears

Reviews come only from verified accounts. Sign in or create an account first — your e-mail is never shown.

Your rating

0 characters · at least 80, up to 3,000

Posted from your verified account. Reviews appear after an editor reads them, usually within two working days.

Featured on iTechGuides

Featured on iTechGuides — factory_boy 6.8/10

factory_boy is listed in our Test Data Generation Tools directory. Add the badge to your site — it links back to this page.

<a href="https://www.itechguides.com/products/factory-boy/"><img src="https://www.itechguides.com/best/badge/factory-boy.svg" alt="Featured on iTechGuides" width="230" height="46"></a>

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.

Last updated · How we research and update