# model-bakers/model_bakery

Object factory for Django

Repository: https://github.com/model-bakers/model_bakery
Canonical: https://ross.abutalabs.com/products/model_bakery
Homepage: https://model-bakery.readthedocs.io
Language: Python
License: Apache-2.0
License Family: permissive
Topics: django, object-factory, fixtures, python
Last push: 2026-09-02T14:32:10+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 90, longevity 100
- inputs: {"age_days": 2521, "days_push": 0, "days_rel": 71, "gap_med": 17, "n_releases_24m": 16}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1002, forks 107 (observed 2026-09-03T02:15:15.180130+00:00)

## What it is
Model Bakery is a Python library that provides smart object factories for creating Django model instances in tests. It auto-fills model fields with sensible random values so you can create fixtures with a single line of code.

## Use cases
- create django test fixtures quickly
- generate test data for django models
- replace factory_boy with simpler api
- bulk create model instances in tests
- auto-fill model fields with fake data
- set up test data in django test cases

## When to choose
- you write Django tests and need model instances without boilerplate
- you want automatic field population with sensible defaults
- you prefer a minimal API over factory_boy's verbosity

## When to avoid
- your project does not use Django ORM
- you need highly controlled, deterministic fixture data for every field
- you need factories for non-Django data structures only

## Facets
- artifact type: library
- maturity: active
- function: testing, data-generation, orm
- domain: testing, web-development, developer-tools
- platform: python
- tags: django, test-fixtures, object-factory, factory-boy-alternative

## Member repositories
- model-bakers/model_bakery (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:15.180130+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:14:01.497809+00:00, confidence not recorded.
  - readme: https://github.com/model-bakers/model_bakery (fetched 2026-09-03T02:15:15.180130+00:00, sha f2845d7f9b53)
  - registry_pypi: https://pypi.org/pypi/model_bakery/json (fetched 2026-08-29T13:14:24.742202+00:00, sha 5b961c08df33)
- Data as of 2026-08-30T08:39:29.467469+00:00.
