Skip to main content

CI Status PyPI package version PyPI python versions

pgpro-pytest-html-json-extractor

A tool to extract json data from pytest-html report. Developed and maintained by Postgres Professional.

Key features

  • Extractor supports pytest-html v4.0.2+
  • Extractor produces JSON with unescaped HTML entities in log messages (for pytest-html v4.1.0+)

Installation

You can install the package directly from the repository (until it's published to PyPI):

pip install pgpro-pytest-html-json-extractor

Usage

After installation, the tool is available via the pgpro-pytest-html-json-extractor command.

Basic Examples

Extract JSON from a report:

pgpro-pytest-html-json-extractor report.html -o report.json

Command Line Arguments

Argument Shorthand Required Description Default
--version No Show program's version number and exit None
--out -o Yes Name of the output JSON file None
--verbose -v No Level of logging verbosity 3
--no-check-json No Do not validate json data after extraction None
--unescape-logs No HTML entity decoding mode for logs (auto, yes, no) auto
--replace -r No Replace output if it exists None
input Yes Positional argument for HTML file None

Log Unescaping Modes (--unescape-logs)

The tool provides granular control over how HTML entities (like ", & or ") are handled within test logs:

  • auto (Default): Smart detection mode. Automatically decides whether to decode entities based on the detected pytest-html report version. It ensures that logs are restored to their original "human-readable" state while maintaining the safety of other report metadata.

  • yes: Forceful decoding. Every HTML entity in the log field will be converted back to its literal character. Use this if you are dealing with heavily encoded custom output.

  • no: Raw mode. Disables all decoding, leaving the log data exactly as it was stored in the HTML source (including "Russian Doll" double-encoding). Ideal for debugging report structure or forensic data analysis.

Contributing

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/amazing-feature).
  3. Commit your changes (git commit -m 'feat: add some amazing feature').
  4. Push to the branch (git push origin feature/amazing-feature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

© 2026 Postgres Professional

Metadata

Release files for pgpro-pytest-html-json-extractor 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pgpro-pytest-html-json-extractor 1.1.1
File Size Uploaded
pgpro_pytest_html_json_extractor-1.1.1.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pgpro-pytest-html-json-extractor 1.1.1
File Interpreter ABI Platform
pgpro_pytest_html_json_extractor-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.0 kB

Release files / pgpro_pytest_html_json_extractor-1.1.1.tar.gz

Download URL pgpro_pytest_html_json_extractor-1.1.1.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b5b3fe356f1b9718033054296542fb30c9207557a50c114a247b2e34e5691658
BLAKE2b-256 checksum
How to use checksums
3110f583f501a2f4cd6f6398353e8476e766fc8814b0d0927149f07324a124c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 13, 2026.

Transparency log

Release files / pgpro_pytest_html_json_extractor-1.1.1-py3-none-any.whl

Download URL pgpro_pytest_html_json_extractor-1.1.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3437ea9e995e007a3186773c986f18875acde5474d26d808dd36e7e55dc9cf84
BLAKE2b-256 checksum
How to use checksums
cd5c30761463e239966ad4a88596681e8b4637e49bea8bd918681ae2d6e65174
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page