Skip to main content

A Python implementation of 3-way merge of texts.

Given BASE, OTHER, THIS, tries to produce a combined text incorporating the changes from both BASE->OTHER and BASE->THIS. All three will typically be sequences of lines.

Usage

From the command-line:

$ echo foo > mine
$ echo bar > base
$ echo blah > other
$ python -m merge3 mine base other > merged
$ cat merged

Or from Python:

>>> import merge3
>>> m3 = merge3.Merge3(
...                    ['common\n', 'base\n'],
...                    ['common\n', 'a\n'],
...                    ['common\n', 'b\n'])
>>> list(m3.merge_annotated())
['u | common\n', '<<<<\n', 'A | a\n', '----\n', 'B | b\n', '>>>>\n']

Metadata

Release files for merge3 1.0.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 merge3 1.0.0
File Size Uploaded Provenance Actions
merge3-1.0.0.tar.gz 15.9 kB With provenance Details for merge3-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 32.4 kB

Release files / merge3-1.0.0.tar.gz

Download URL merge3-1.0.0.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4a8251068cdb2c1aba76d31ae6aff5e6a47c79a1ee1071d5a58f37bf09f2a790
BLAKE2b-256 checksum
How to use checksums
41f75c8c25a763bf630cc26a466c86bb336ee2ed607e459c6d12dac20a6d3aad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / merge3-1.0.0-py3-none-any.whl

Download URL merge3-1.0.0-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7bf07e4193f02540656958227dd015f0df5fd4b91819c7d3ef2334dbe7c4b33
BLAKE2b-256 checksum
How to use checksums
488bab9ef4b4bc3dfd8a8840c92bf7d33cd27438eae15b7cd57c596166df45a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Security for merge3 1.0.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 merge3-1.0.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 Oct 25, 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