skillfed

pytest-fixture-config

Fixture configuration utils for py.test

pytest-fixture-config v1.8.0 351.2K downloads/30d#7,324 on PyPI598
Permissive license MIT license AGING released

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-config

uv

uv add pytest-fixture-config

poetry

poetry add pytest-fixture-config

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Topic :: Software Development :: LibrariesTopic :: Software Development :: TestingTopic :: Utilities

Tags

pytest fixture configurationskip tests missing configpytest config managementfixture setup helpersconditional test skippingpytest plugin configenvironment-based test skipping
pytest-plugintest-configuration

More Libraries packages