Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

goldie

A humble library greasing the gears of golden file tests.

Installation

pip install goldie

Example

This is an example of how to use goldie to test a script across multiple JSON files. The golden files will be used as a reference to compare the output of the script. Adding GOLDIE_UPDATE=1 to the environment variables will update the golden files with the output of the script. Find the full example in the example directory.

import unittest

import goldie


class TestExample(unittest.TestCase):
    def test_script(self):
        config = goldie.ConfigDirectoryTest(
            # We want to test all JSON files in the data directory.
            file_filter="data/*.json",
            config_file_test=goldie.ConfigFileTest(
                run_configuration=goldie.ConfigRun(
                    # We simply run the script in this directory.
                    cmd="python",
                    args=["script.py"],
                    # The script reads from stdin and writes to stdout.
                    input_mode=goldie.InputMode.STDIN,
                    output_mode=goldie.OutputMode.STDOUT,
                ),
                comparison_configuration=goldie.ConfigComparison(
                    # We want to leverage the JSON structure instead of comparing raw strings.
                    comparison_type=goldie.ComparisonType.JSON,
                    json_processing_config=goldie.ConfigProcessJson(
                        replacements=[
                            # We want to replace an unstable value with a stable one.
                            goldie.JsonReplacement(path="data.random", value=3),
                        ],
                    ),
                ),
            ),
        )
        goldie.testing.run_directory_unittest(self, config)


if __name__ == "__main__":
    unittest.main()

Metadata

Release files for goldie 0.1.10.dev0

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

Source distribution (sdist)

Source distribution for goldie 0.1.10.dev0
File Size Uploaded Provenance Actions
goldie-0.1.10.dev0.tar.gz 16.9 kB With provenance Details for goldie-0.1.10.dev0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for goldie 0.1.10.dev0
File Interpreter ABI Platform Actions
goldie-0.1.10.dev0-py3-none-any.whl Python 3 none any Details for goldie-0.1.10.dev0-py3-none-any.whl

Total release size: 34.5 kB

Release files / goldie-0.1.10.dev0.tar.gz

Download URL goldie-0.1.10.dev0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8203d60fd8bd17da5cd0d4249611ea3eb79905fb35b017d87ee6ea37ccf9d84b
BLAKE2b-256 checksum
How to use checksums
2bd795f5382740510548f3d244601e6089de0c8f6d329dd8ddc58b032a30bc69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 13, 2026.

Transparency log

Release files / goldie-0.1.10.dev0-py3-none-any.whl

Download URL goldie-0.1.10.dev0-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb1c04774f6a49a31204b6520d8b3d7347e0fafb0de45ee0735f74e5584d67af
BLAKE2b-256 checksum
How to use checksums
f5f8cf9225756aec7a3c3f66f4e449f1d767e919c2a40873772de9def25c6c76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 13, 2026.

Transparency log

Security for goldie 0.1.10.dev0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for goldie-0.1.10.dev0.tar.gz

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 Oct 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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