Skip to main content

Print per-character string diffs to terminal w/ Python

Project description

PyPI-Status PyPI-Versions Build-Status Codefactor code quality LICENCE

Print per-character string diffs to terminal w/ Python.

Done using wasabi, and based on a gist by ines (which is also the writer of wasabi). And in “based” I mean it’s just that gist in a package form.

https://raw.githubusercontent.com/shaypal5/chardif/master/chardif_example.png?sanitize=true

Installation

Install chardif with:

pip install chardif

Use

Just a single function, folks:

from chardif import chardif
import datetime

chardif("rabbits", "grab it")

Contributing

Package author and current maintainer is Shay Palachy (shay.palachy@gmail.com); You are more than welcome to approach him for help. Contributions are very welcomed.

Installing for development

Clone:

git clone git@github.com:shaypal5/chardif.git

Install in development mode with test dependencies:

cd chardif
pip install -e ".[test]"

Running the tests

To run the tests, call the pytest command in the repository’s root, or:

python -m pytest

To run only pickle core related tests, use:

pytest -m mongo

Adding documentation

This project is documented using the numpy docstring conventions, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings (in my personal opinion, of course). When documenting code you add to this project, please follow these conventions.

Credits

Done using wasabi, and based on a gist by ines (which is also the writer of wasabi). And in “based” I mean it’s just that gist in a package form.

Created by Shay Palachy (shay.palachy@gmail.com).

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

chardif-0.0.1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

chardif-0.0.1-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file chardif-0.0.1.tar.gz.

File metadata

  • Download URL: chardif-0.0.1.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for chardif-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b8670feeb089c1b1bffa3f6a6e5c7c88ccc069b592c074b85be1e2f206bf0764
MD5 cc07c4ef508d9217b972ee217e9657b5
BLAKE2b-256 de2e63c3ac1ae04266543b321c5dd66d592215d9eea778ef08c38b2d0d9da52b

See more details on using hashes here.

File details

Details for the file chardif-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: chardif-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for chardif-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8af3147619576fd52773a21fb2b1622d5ca77c05a6775d970d8c6811c56d8cb4
MD5 e01adeeac6b06de88dad6b6619b01630
BLAKE2b-256 c1a8e6080de3cbacdebbba332a64a344ae7ba8fa16dba69b813d7db122f6ff24

See more details on using hashes here.

Supported by

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