Diffusor
A pure-python diffing utility using Google's diff-match-patch.
This is a utility script for a very specific purpose, namely easy generation and application of diffs for Python-centric projects, programmatically from within Python.
This tool serves exactly two functions:
- Create diffs between two versions of the same file
- Apply diffs to a file
It works on a per-file basis.
If you don't have a specific use case for this, you're probably better off using Git diffs and the ubiquitous Linux patch tool. Diffusor exists specifically for easing the patch-apply workflow within Python programs, nothing more, nothing less.
Installation
Diffusor can be installed via pip:
$ pip install diffusor
Please note that Diffusor requires Python 3 and will not provide backwards compatibility for Python 2 for the foreseeable future.
Usage
To create a diff:
diffusor diff <source_file> <modified_file> -n <target_file>
To apply a diff:
diffusor apply <patch_file> -t <target_file>
Command Line Interface
Usage: diffusor.py [OPTIONS] COMMAND [ARGS]...
A pure-python diffing utility using Google's diff-match-patch.
This tool serves exactly two functions:
1. Create diffs between two versions of the same file
2. Apply diffs to a file
Commands can be abbreviated by the shortest unique string.
For example:
diff -> d
apply -> a
Examples of full commands:
diffusor diff <source_file> <modified_file> -n <target_file>
diffusor apply <patch_file> -t <target_file>
Options:
-d, --debug / -nd, --no-debug Print debug information or only regular
output
--help Show this message and exit.
Commands:
apply
diff
Metadata
Release files for diffusor 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diffusor-1.3.0.tar.gz | 4.1 kB | Without provenance | Details for diffusor-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diffusor-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for diffusor-1.3.0-py3-none-any.whl |
Total release size: 8.6 kB
Release files / diffusor-1.3.0.tar.gz
| Download URL | diffusor-1.3.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d78b6a3c379668f225a0827818ec3990506cd48c2e5349ba755dfbf598b8651c
|
|
BLAKE2b-256 checksum How to use checksums |
8de791ab505ef55f113377c3aed0028266a52194aabf2464711412bb8a3a639c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.8.9 Linux/4.15.0-1092-aws
|
Release files / diffusor-1.3.0-py3-none-any.whl
| Download URL | diffusor-1.3.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b223f7bfa4107f4f7fbbc949f99b2080834b828eb1e873071e7862fa0645a2f4
|
|
BLAKE2b-256 checksum How to use checksums |
4d09d6c00866ac92c8559038d0d58eaa8f0335d726e90b68cc4061e08ee88243
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.8.9 Linux/4.15.0-1092-aws
|
Security for diffusor 1.3.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.