Skip to main content

indifference

Track and compare differences between Python objects.

Installation

uv pip install indifference

Usage

import pickle
from copy import deepcopy
from indifference import diff, at


class Person:
    def __init__(self, name):
        self.name = name
        self.cache = {}
        self.secret = "hidden"

    def __deepcopy__(self, memo):
        return self

    def __reduce__(self):
        # Pickle excludes secret and modifies name
        state = {"name": "Bob", "cache": {}}
        return (self.__class__, (self.name,), state)

    def __setstate__(self, state):
        self.__dict__.update(state)


original = Person("Alice")

deepcopy_version = deepcopy(original)
pickle_version = pickle.loads(pickle.dumps(original))

deepcopy_story = diff(original, deepcopy_version)
pickle_story = diff(original, pickle_version)


# Use set operations to find differences
differences = deepcopy_story ^ pickle_story  # symmetric difference
common = deepcopy_story & pickle_story  # intersection
unique_to_pickle = pickle_story - deepcopy_story
all_changes = deepcopy_story | pickle_story

# Check what's different between the stories
assert differences == [at.name > "Bob"]

Development

Metadata

Release files for indifference 0.2.0

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

Source distribution (sdist)

Source distribution for indifference 0.2.0
File Size Uploaded Provenance
indifference-0.2.0.tar.gz 12.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for indifference 0.2.0
File Interpreter ABI Platform
indifference-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.3 kB

Release files / indifference-0.2.0.tar.gz

Download URL indifference-0.2.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fd2bd51dbf1d4879627724b0a034d81561bf1f8994294b7af8f5c05a8cecd48d
BLAKE2b-256 checksum
How to use checksums
c7395976ce7a6905029a11cbb2c6a13b31a28cac6f324f4cd39326cb346e3cd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 12, 2026.

Transparency log

Release files / indifference-0.2.0-py3-none-any.whl

Download URL indifference-0.2.0-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a94ff7f81c04d6f07ec64f1e0acddb5d08e0ca8cf5e8c566479666893b37f18b
BLAKE2b-256 checksum
How to use checksums
1884f534f042ca0ca1a37f27f4508ede6c60e64b973f81b57adf828eb9c4e884
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 12, 2026.

Transparency log

Security for indifference 0.2.0

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 indifference-0.2.0.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 Feb 12, 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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