$npx skillfedfor your agent

pytest-variables

pytest plugin for providing variables to tests/fixtures

Worth itPyPI UtilitiesReleased Feb 2024660.9K downloads / mocopyleft licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_variables-3.1.0-py3-none-any.whl
v3.1.0 · released 2024-02-01 · Python >=3.8 · 1 runtime deps: pytest

Yes. It is a stable, actively maintained plugin with low install friction and no security vulnerabilities. The copyleft license is standard for pytest plugins and poses no barrier for most test suites. Install it if your tests need to consume external configuration files or if you want to separate test data from test code.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later; optional format support (YAML, TOML, Human JSON) requires installing extras like pytest-variables[yaml].
  • Low friction install with only pytest as a runtime dependency.
  • Actively maintained with recent commits; last release was in 2024 and the repository shows ongoing activity.

License · maintenance · safety

copyleft license (copyleft) — Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license. You must disclose source code modifications and include the license with distributions, but can combine with proprietary code in larger works.

last release 2024-02-01 (925 days) · last repo commit 2026-05-26 · 75 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 660,940 downloads/mo, #5,455 on PyPI

Verify before relying

pip install pytest-variables

# Create variables.json:
# {"foo": "bar"}

# In test file:
def test_example(variables):
    assert variables['foo'] == 'bar'
  • Whether merging behavior for duplicate keys across multiple files is predictable enough for complex test suites.
  • Performance characteristics when loading very large variable files.
Same gist for agents: .md · .json

What it is and what it does

pytest-variables is a pytest plugin that externalizes test configuration by loading variables from files into tests as a dictionary. Instead of hardcoding test data or environment values, you specify one or more JSON, YAML, TOML, or Human JSON files via the --variables command-line flag, and the plugin merges them and injects the result into any test that requests the variables fixture. Multiple files are merged in order, with later values overriding earlier ones for non-dictionary keys.

The plugin is useful for test suites that need to run against different configurations—different browsers, operating systems, API endpoints, or credentials—without modifying test code. It supports optional formats (YAML, TOML, Human JSON) via extras, allowing you to choose the file format that best suits your team's workflow. It has a single runtime dependency (pytest) and is actively maintained with support for current Python versions.

Use it for

  • Load browser and OS capabilities for cross-browser Selenium tests from separate JSON files.
  • Inject API endpoints, credentials, or feature flags into integration tests via YAML configuration.
  • Parameterize test data (hostnames, ports, timeouts) without modifying test code.
  • Merge environment-specific variables (dev, staging, prod) from multiple TOML files.
  • Share test configuration across a team via version-controlled variable files.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

It is a stable, actively maintained plugin with low install friction and no security vulnerabilities. The copyleft license is standard for pytest plugins and poses no barrier for most test suites. Install it if your tests need to consume external configuration files or if you want to separate test data from test code.

Install

pytest-variables on PyPI

Before you install

Low friction install with only pytest as a runtime dependency. Actively maintained with recent commits; last release was in 2024 and the repository shows ongoing activity.

Requires Python 3.8 or later; optional format support (YAML, TOML, Human JSON) requires installing extras like pytest-variables[yaml].

License in practice

Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license. You must disclose source code modifications and include the license with distributions, but can combine with proprietary code in larger works.

Quickstart

pip install pytest-variables

# Create variables.json:
# {"foo": "bar"}

# In test file:
def test_example(variables):
    assert variables['foo'] == 'bar'

Verify before relying

  • Whether merging behavior for duplicate keys across multiple files is predictable enough for complex test suites.
  • Performance characteristics when loading very large variable files.

Package facts

Licensecopyleft license copyleft
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pytest
MaintenanceActively maintained 925 days since the last release
Last repo commit
First released
Downloads660,940 / month, #5,455 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Natural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Utilities

Evidence: pytest_variables-3.1.0-py3-none-any.whl

Tags

Capabilities
pytest variables from filepytest json configurationpytest test data injectionpytest yaml fixturespytest parameterized test data
Topics
test-configurationpytest-plugindata-driven-testing
PyPI keywords
jsonpytestvariables

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 › “pytest variables from file”

  • pytest-variablesA pytest plugin that loads test variables from JSON, YAML, TOML, or…
  • pytest-dotenvA pytest plugin that automatically loads environment variables from…
  • pytest-envA pytest plugin that loads environment variables from configuration…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also pytest-selenium · pytest-metadata · pytest-regressions · pytest · pytest-env · pytest-helpers-namespace · pytest-lazy-fixtures · pytest-playwright · pytest-html