Skip to main content

Do you have textual (or binary) data that you need to patch?

` >>> a = 'you say yes, i say no' >>> b = 'you say stop, and i say go go go' `

But you want a smaller patchfile than what difflib’s unified_diff() creates?

` >>> diff = '\n'.join(difflib.unified_diff(a, b)) >>> len(diff) 137 `

mini_patch also uses difflib’s SequenceMatcher machinery, but it creates tiny, ASCII-encoded patches:

` >>> patch = mini_patch.make_mini_patch(a.encode('utf-8'), b.encode('utf-8')) >>> patch '0!d:8,2;i:11,$4$dG9w;i:12,$8$IGFuZA==;r:19,1,$4$Zw==;i:21,$8$IGdvIGdv;' >>> len(patch) 70 `

Download files

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

Source Distribution

mini_patch-1.0.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distributions

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

mini_patch-1.0.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

mini_patch-1.0.0-py2-none-any.whl (4.0 kB view details)

Uploaded Python 2

File details

Details for the file mini_patch-1.0.0.tar.gz.

File metadata

  • Download URL: mini_patch-1.0.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.9.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.4.2

File hashes

Hashes for mini_patch-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2ddd94c577fe379a937686c6713762324bcaed4de9dd1efe204d72e38b854d8b
MD5 fcedebce10ecfc9e8792ec42c15f86b2
BLAKE2b-256 4ecb798a667b55b055472e6673bc7c777113dda29d108c35650140803181d553

See more details on using hashes here.

File details

Details for the file mini_patch-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mini_patch-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.9.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.4.2

File hashes

Hashes for mini_patch-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a07adbe00621867fbee7f8cf01e2a0adbfafce3641c751064537c011882edee
MD5 1f1f4760e7bc714c609032a660bc439f
BLAKE2b-256 fe91b0fbefeec4a3763d6a549aa644c51aaccc91dba9f5c1cfcff9fde1fda862

See more details on using hashes here.

File details

Details for the file mini_patch-1.0.0-py2-none-any.whl.

File metadata

  • Download URL: mini_patch-1.0.0-py2-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.9.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.4.2

File hashes

Hashes for mini_patch-1.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 99b3cfe6e8db42b25495ac73b00268f00e8376dacada35f9e0f1b4a4d68945be
MD5 a0629db0bb5afdfb89cb4fed67c26ee5
BLAKE2b-256 d4f2a6fe1566fcdbbee9cecdd7d2efe838517e50be111048da40d2d92b3c520d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

3 files

0.0.3

3 files

0.0.2

3 files

0.0.1

3 files

Supported by

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