--- id: types-factory-boy version: "0.4.1" license: MIT license_treatment: permissive maintenance: active --- # types-factory-boy — Typing stubs for factory-boy License: permissive · Maintenance: active · Downloads: 457.3K/mo ## 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 above — verify before relying. Provides PEP 561 type stubs for factory-boy, enabling static type checkers like mypy and PyCharm to validate code that uses factory-boy for test fixture generation. 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 pip install types-factory-boy uv add types-factory-boy poetry add types-factory-boy ## Installing types-factory-boy 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. 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 Requires factory-boy to be installed; type checking benefits only apply when using a compatible type checker like mypy, PyCharm, or pytype. 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_current - Install friction: low - Maintenance: active - Downloads: 457.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs factory-boy, mypy factory-boy typing, factory-boy type checking, pep 561 stubs, static type checking fixtures, factory-boy type hints, type-stubs, testing [View on SkillFed](https://skillfed.io/packages/types-factory-boy) · [View on PyPI](https://pypi.org/project/types-factory-boy/)