--- id: pycobertura version: "4.1.0" license: unclear license_treatment: permissive maintenance: aging --- # pycobertura — "A Cobertura coverage parser that can diff reports and show coverage progress." License: permissive · Maintenance: aging · Downloads: 468.0K/mo ## What it is and what it does pycobertura is a command-line tool and Python library for parsing Cobertura XML coverage reports and computing diffs between two reports. It helps teams prevent code coverage from decreasing by highlighting uncovered changes and comparing coverage metrics across versions. The tool outputs results in multiple formats—plain text, HTML, CSV, JSON, YAML, and GitHub annotations—making it flexible for integration into CI/CD pipelines and reporting workflows. The package depends on click for CLI scaffolding, jinja2 for HTML templating, lxml for XML parsing, tabulate for formatted table output, and ruamel.yaml for YAML serialization. It runs on Python 3.7 and later and has been in active development since 2014, though releases have slowed in recent months. Use it for: - Detect coverage regressions in pull requests by comparing new and old coverage reports in CI/CD pipelines. - Generate HTML coverage reports with source code highlighting to visualize covered and uncovered lines. - Export coverage metrics to JSON or YAML for downstream analysis or dashboard integration. - Create GitHub check annotations from coverage data to surface uncovered changes directly in pull request reviews. - Parse and summarize Cobertura reports in multiple formats (CSV, Markdown, plain text) for team reporting. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses Cobertura code coverage reports and compares two reports to show coverage changes, with output in multiple formats including plain text, HTML, CSV, JSON, YAML, and GitHub annotations. Yes, if you work with Cobertura reports and need to track coverage changes. The tool is straightforward to install, has no known vulnerabilities, and offers flexible output formats. The aging maintenance status (325 days since last release) is a minor concern for long-term stability, but the repository is not archived and the API is documented as unstable until 1.0, so plan accordingly if you depend on exact behavior across versions. ## Install pip install pycobertura uv add pycobertura poetry add pycobertura ## Installing pycobertura Before you install: Low friction install with five common dependencies (click, jinja2, lxml, tabulate, ruamel.yaml). Maintenance status is aging—last release was 325 days ago, though the repository remains active and not archived. License in practice: Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions. Quickstart: pip install pycobertura pycobertura show coverage.xml pycobertura diff coverage.old.xml coverage.new.xml --source1 old_src/ --source2 new_src/ Requires Python 3.7 or later; source code directories must be provided to the diff command to properly compute missing line information. Verify before relying: - Whether the unstable API (noted as subject to change until 1.0) poses a risk for long-term dependency use. - Performance characteristics when processing large or deeply nested Cobertura XML files. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 468.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cobertura coverage diff, coverage report parser, code coverage comparison, coverage regression detection, cobertura xml analysis, coverage metrics reporting, test coverage tracking, coverage-testing, ci-cd-integration, code-metrics [View on SkillFed](https://skillfed.io/packages/pycobertura) · [View on PyPI](https://pypi.org/project/pycobertura/)