pytest-fixture-config
Fixture configuration utils for py.test
What it is and what it does
pytest-fixture-config is a pytest plugin that simplifies managing configuration for test fixtures. It lets you define configuration objects that read values from environment variables or other sources, then use decorators to conditionally skip tests when required configuration is missing. This is useful when your test suite includes optional tests for features you might not have installed or configured on every machine.
The package provides a Config base class you subclass to define your fixture configuration, plus decorators like requires_config and yield_requires_config that automatically skip tests when their required settings aren't available. It integrates directly into pytest as a plugin and requires only pytest as a runtime dependency.
Use it for:
- Skip integration tests when external service credentials (API keys, database URLs) are not set in the environment.
- Conditionally run tests for optional features based on whether their configuration is available.
- Manage fixture setup that depends on environment-specific settings without failing the entire test suite.
- Define reusable configuration singletons across multiple test fixtures in a conftest.py.
- Test code paths that require specific tools or services without breaking CI/CD when they're unavailable.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides configuration objects and decorators for pytest fixtures that allow you to define, manage, and conditionally skip tests based on required configuration variables.
Yes, if you need to conditionally skip pytest fixtures based on missing configuration. The package is stable, permissively licensed, and has low install friction. The aging maintenance status (last release 666 days ago) is a minor concern but not a blocker—the repository is still active and the package is marked Production/Stable. Install it if you're managing optional test fixtures or environment-dependent test setup.
Install
pytest-fixture-config on PyPI
pip
pip install pytest-fixture-configuv
uv add pytest-fixture-configpoetry
poetry add pytest-fixture-configInstalling pytest-fixture-config
Before you install
Low friction install with a single runtime dependency on pytest. Maintenance status is aging—last release was 666 days ago, though the repository remains active with a recent commit in January 2026 and 598 stars. The package has been stable since its 2015 initial release.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install pytest-fixture-config
# In conftest.py or test file:
import os
from pytest_fixture_config import Config, requires_config
class FixtureConfig(Config):
__slots__ = ('api_key',)
CONFIG = FixtureConfig(api_key=os.getenv('API_KEY'))
@pytest.fixture
@requires_config(CONFIG, ['api_key'])
def my_fixture():
return CONFIG.api_key
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode given the 666-day gap since last release.
- Compatibility with pytest versions beyond those listed in the changelog (4.0.0+).
Package facts
| License | MIT license (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pytest |
| Maintenance | aging — 666 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 351,234/month — #7,324 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_fixture_config-1.8.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pytest-lazy-fixtureAllows you to use pytest fixtures directly as…
permissive · top 15,000 on PyPI
pytest-shutilProvides pytest fixtures and utilities for…
permissive · top 15,000 on PyPI
pytest-skip-markersA pytest plugin that provides skip markers to…
permissive · top 15,000 on PyPI
pytest-lazy-fixturesAllows you to reference pytest fixtures…
permissive · top 5,000 on PyPI
pytest-dependencyA pytest plugin that marks tests as dependent…
permissive · top 5,000 on PyPI
pytest-redisA pytest plugin that provides fixtures for…
copyleft · top 15,000 on PyPI
pytest-dockerpytest-docker provides pytest fixtures that…
permissive · top 5,000 on PyPI
pytest-deadfixturesA pytest plugin that identifies unused and…
permissive · top 5,000 on PyPI
pytest-mock-resourcesProvides pytest fixtures that spin up real…
permissive · top 15,000 on PyPI
pytest-profilingPytest plugin that profiles test execution…
permissive · top 5,000 on PyPI