$npx skillfedfor your agent

pytest-metadata

pytest plugin for test session metadata

Worth itPyPI UtilitiesReleased Feb 202435.2M downloads / mocopyleft licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_metadata-3.1.1-py3-none-any.whl
v3.1.1 · released 2024-02-12 · Python >=3.8 · 1 runtime deps: pytest

Yes. This is a stable, actively maintained plugin in the top 1000 PyPI packages with no known vulnerabilities. It has minimal dependencies (pytest only) and low install friction. It's essential if you need to capture, display, or act on test session environment metadata—particularly valuable in CI/CD pipelines and for generating reproducible test reports.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later, or PyPy3.
  • Low friction: pure Python wheel with only pytest as a runtime dependency.
  • Actively maintained with recent commits; last release was 2024-02-12 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 may use and modify the code freely, but derivative works must be distributed under the same license.

last release 2024-02-12 (914 days) · last repo commit 2026-05-25 · 71 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 35,249,000 downloads/mo, #748 on PyPI

Verify before relying

pip install pytest-metadata

# In a test file:
def test_check_metadata(metadata):
    assert 'Python' in metadata
    assert 'Platform' in metadata

# Run with metadata display:
pytest --verbose --metadata foo bar
  • Whether the plugin automatically detects all major CI platforms or requires explicit configuration for some environments.
  • Performance impact when collecting metadata from many CI environment variables in large test suites.
Same gist for agents: .md · .json

What it is and what it does

pytest-metadata is a pytest plugin that automatically gathers and makes available metadata about your test session. It collects standard information like the Python version, operating system platform, installed pytest packages, and active plugins. When running in a continuous integration environment (AppVeyor, Bitbucket, CircleCI, GitLab CI, Jenkins, TaskCluster, or Travis CI), it also extracts relevant CI environment variables and includes them in the metadata.

You can access this metadata in multiple ways: through a pytest fixture named `metadata` in your tests, via a hook function `pytest_metadata` to modify or filter the data, through the config stash in plugins, or displayed in test reports when using `--verbose`. You can also add custom metadata via command-line flags (`--metadata`, `--metadata-from-json`, `--metadata-from-json-file`) or include it in JUnit XML output using the `include_metadata_in_junit_xml` fixture.

Use it for

  • Display test environment details in verbose test output to verify which Python version and platform a test suite ran on.
  • Embed CI build information (branch, commit, build ID) into JUnit XML reports for traceability.
  • Access platform and package versions from within a test to skip or adapt behavior based on environment.
  • Integrate with HTML report plugins like pytest-html to show environment context at the start of reports.
  • Filter sensitive metadata (e.g., passwords) before reports are generated using the pytest_metadata hook.

Worth the install?

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

Worth it

Yes.

This is a stable, actively maintained plugin in the top 1000 PyPI packages with no known vulnerabilities. It has minimal dependencies (pytest only) and low install friction. It's essential if you need to capture, display, or act on test session environment metadata—particularly valuable in CI/CD pipelines and for generating reproducible test reports.

Install

pytest-metadata on PyPI

Before you install

Low friction: pure Python wheel with only pytest as a runtime dependency. Actively maintained with recent commits; last release was 2024-02-12 and the repository shows ongoing activity.

Requires Python 3.8 or later, or PyPy3.

License in practice

Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license. You may use and modify the code freely, but derivative works must be distributed under the same license.

Quickstart

pip install pytest-metadata

# In a test file:
def test_check_metadata(metadata):
    assert 'Python' in metadata
    assert 'Platform' in metadata

# Run with metadata display:
pytest --verbose --metadata foo bar

Verify before relying

  • Whether the plugin automatically detects all major CI platforms or requires explicit configuration for some environments.
  • Performance impact when collecting metadata from many CI environment variables in large test suites.

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 914 days since the last release
Last repo commit
First released
Downloads35,249,000 / month, #748 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_metadata-3.1.1-py3-none-any.whl

Tags

Capabilities
pytest session metadatapytest test environment infopytest plugin metadata capturepytest CI environment variablespytest session info fixture
Topics
pytest-pluginci-metadata
PyPI keywords
metadatapytest

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 session metadata”

  • pytest-metadataA pytest plugin that captures and exposes test session…
  • pytest-harvestpytest-harvest captures and stores data generated during test…
  • pytest-reportlogWrites pytest test results to a JSON Lines file in real-time,…

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-base-url · pytest-variables · pytest-selenium · pytest-xml · pytest-excel · pytest-rabbitmq · pytest-html · pytest-json-report · pytest-json · pytest-reporter-html1