Skip to main content

Gives you a pretty good diff between two objects

Project description

Pretty Good Diff

This tool allows developers to compare two objects and see a highlight of the differences between them. It works with strings and dictionaries. This project was made to help me fix unit tests with failing assertions quicker, especially when the objects are huge or very nested and complicated. I simply call show_diff on the two objects before an assert statement.

show_diff

Import the show_diff method like from pretty_good_diff import show_diff.

Then, call show_diff(first_object, second_object) to see a colored diff of the input objects. first_object and second_object need to have the same type and be either str or dict objects.

Before: alt text

After: alt text

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pretty-good-diff-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pretty_good_diff-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file pretty-good-diff-0.1.0.tar.gz.

File metadata

  • Download URL: pretty-good-diff-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for pretty-good-diff-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e60b396b28b1348b3c243038b94f15d82e25777cc06a26ce5c6ba9d6abc3bc3b
MD5 c52a3c674c139fe8846404a2b5993245
BLAKE2b-256 d8e10c875652f9b824da40d55d97e0708c523dc77f4e2c56faee827d534f10c4

See more details on using hashes here.

File details

Details for the file pretty_good_diff-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pretty_good_diff-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92f29c90f06bd758abb01ccd3fe6ee72a2da3d002eafe026766e70d6097a9bce
MD5 e6657989721f46c1666991ace3bded9f
BLAKE2b-256 668b68d504332757034f428a06dd479c4951f3cabc8ba068fa150207facf9d57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page