types-factory-boy
Typing stubs for factory-boy
Decision gist · record as of 2026-08-14
Yes, if you use factory-boy in a type-checked codebase. It has no runtime overhead, low installation friction, and permissive licensing. The only caveat is that the latest release is from March 2023, so verify stub coverage matches your factory-boy version before relying on it for strict type enforcement.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires factory-boy to be installed; type checking benefits only apply when using a compatible type checker like mypy, PyCharm, or pytype.
- Low friction installation with only two runtime dependencies (factory-boy and typing-extensions).
- Actively maintained as of August 2026, though the latest release is from March 2023.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.
last release 2023-03-12 (1251 days) · last repo commit 2026-08-10 · 24 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 457,278 downloads/mo, #6,548 on PyPI
Alternatives
Verify before relying
pip install types-factory-boy
import factory
from typing import TYPE_CHECKING
if TYPE_CHECKING:
# Type checker now understands factory-boy classes
pass- Whether stub coverage is complete for all factory-boy public APIs and recent versions.
- How frequently stubs are updated relative to factory-boy releases.
What it is and what it does
types-factory-boy is a PEP 561 type stub package that bridges the gap between factory-boy (a popular Python fixture library) and static type checkers. It provides type annotations for factory-boy's public API, allowing tools like mypy, PyCharm, and pytype to understand and validate code that uses factory-boy for generating test fixtures.
The package is a thin, zero-runtime-cost addition to your development environment. Once installed alongside factory-boy, it enables your type checker to catch type errors in fixture definitions and usage without requiring factory-boy itself to be rewritten with inline type hints. It supports Python 3.7 through 3.11 and is maintained actively.
Use it for
- Enable mypy or PyCharm to type-check factory-boy fixture definitions and catch type mismatches before runtime.
- Validate that test factories produce objects matching expected type signatures in a typed codebase.
- Provide IDE autocomplete and type hints for factory-boy class attributes and methods.
- Integrate factory-boy into a strict type-checking CI pipeline without modifying factory-boy itself.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use factory-boy in a type-checked codebase.
It has no runtime overhead, low installation friction, and permissive licensing. The only caveat is that the latest release is from March 2023, so verify stub coverage matches your factory-boy version before relying on it for strict type enforcement.
Install
types-factory-boy on PyPI
Before you install
Low friction installation with only two runtime dependencies (factory-boy and typing-extensions). Actively maintained as of August 2026, though the latest release is from March 2023.
Requires factory-boy to be installed; type checking benefits only apply when using a compatible type checker like mypy, PyCharm, or pytype.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.
Quickstart
pip install types-factory-boy
import factory
from typing import TYPE_CHECKING
if TYPE_CHECKING:
# Type checker now understands factory-boy classes
pass
Verify before relying
- Whether stub coverage is complete for all factory-boy public APIs and recent versions.
- How frequently stubs are updated relative to factory-boy releases.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesfactory-boytyping-extensions |
| Maintenance | Actively maintained 1,251 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 457,278 / month, #6,548 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Typing :: Stubs Only |
Evidence: types_factory_boy-0.4.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “type stubs factory-boy”
- types-factory-boyProvides PEP 561 type stubs for factory-boy, enabling static type…
- factory-boyfactory_boy replaces static test fixtures with declarative factories…
- wagtail-factoriesProvides factory-boy classes for generating test fixtures and mock…
Give your agent the search over MCP, or paste the wish link into any chat.
More Quality Assurance packages
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.
pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.
Install it if your test suite takes long enough that parallelization would save meaningful time.
Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.
Install it if you work with CloudFormation templates.
See also types-backports · types-attrs · factory-boy · types-futures · types-Werkzeug · types-tornado · wagtail-factories · types-MarkupSafe · types-orjson · types-Jinja2