{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/3"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/3"},{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/2"}],"enrichment":{"capability":"Integrates factory_boy with pytest to register factories as fixtures, enabling dependency injection and parametrization of test object creation.","skillfed_tags":["pytest-plugin","test-fixtures","factory-pattern"],"use_cases":["Create reusable test fixtures for model objects without writing fixture functions.","Parametrize test object attributes via pytest.mark.parametrize without modifying factory definitions.","Build complex object graphs with SubFactory relationships that automatically resolve as fixture dependencies.","Register multiple instances of the same factory with different names for testing relationships between objects.","Override factory attributes at registration time to create specialized fixture variants for different test scenarios."],"what_it_does":"pytest-factoryboy bridges factory_boy and pytest by automatically converting factory classes into pytest fixtures. Instead of manually instantiating test objects or writing fixture boilerplate, you register a factory once and pytest injects instances directly into test functions. The package creates both model fixtures (instances) and factory fixtures (the factory itself), plus attribute fixtures that let you override individual fields via pytest parametrization.\n\nThe integration handles factory_boy's advanced patterns: SubFactory relationships become fixture dependencies, related factories are injected automatically, and post-generation hooks work as fixtures. You can register the same factory multiple times with different names, specialize fixtures with keyword arguments during registration, and use LazyFixture to inject other fixtures as attribute values. This approach reduces boilerplate and makes test setup declarative and composable.","worth_installing":"Yes. This is a mature, actively maintained package (first release 2015-04-09, latest 2025-07-01) with no known vulnerabilities, low install friction, and permissive MIT licensing. It solves a real pain point\u2014combining factory_boy's declarative test data with pytest's fixture system\u2014and is widely used (top 5000 PyPI packages). Install it if you use factory_boy and pytest together."},"id":"pytest-factoryboy","links":{"html":"https://skillfed.io/packages/pytest-factoryboy","md":"https://skillfed.io/packages/pytest-factoryboy.md","pypi":"https://pypi.org/project/pytest-factoryboy/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-07-01","license_spdx":null,"license_treatment":"permissive","name":"pytest-factoryboy","python_support":"supports_current","summary":"Factory Boy support for pytest."},"popularity":{"monthly_downloads":2833269,"position":2873,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.8.1"}
