https://github.com/harens/checkdigit
🔒 An easy-to-use check digit library for data validation
https://github.com/harens/checkdigit
check-digit crc credit-card ean gs1 gtin isbn luhn luhn-algorithm upc verhoeff
Last synced: 11 months ago
JSON representation
🔒 An easy-to-use check digit library for data validation
- Host: GitHub
- URL: https://github.com/harens/checkdigit
- Owner: harens
- License: gpl-3.0
- Created: 2019-01-19T17:50:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T20:27:12.000Z (over 2 years ago)
- Last Synced: 2025-05-26T17:22:29.396Z (11 months ago)
- Topics: check-digit, crc, credit-card, ean, gs1, gtin, isbn, luhn, luhn-algorithm, upc, verhoeff
- Language: Python
- Homepage: https://checkdigit.rtfd.io
- Size: 15.3 MB
- Stars: 33
- Watchers: 3
- Forks: 7
- Open Issues: 11
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
.. raw:: html
=========
.. raw:: html
**checkdigit** is a pure Python library built for identification numbers.
You want to validate a credit card number, or maybe even calculate a missing digit on an ISBN code?
We've got you covered 😎.
Want to know more? Check out the `API Reference and documentation `_!
Installation
------------
`MacPorts `_ 🍎
*************************************************************************
.. code-block::
sudo port install py-checkdigit
`PyPi `_ 🐍
**************************************************
.. code-block::
pip install checkdigit
✨ Features
------------
* 📦 Works out of the box with all `supported Python versions `_ (3.7-3.11).
* ⌨️ `PEP 561 compatible `_, with built in support for type checking.
* 🏃 Zero runtime dependencies. What you see is what you get.
* 🧮 Capable of calculating missing digits or validating a block of data.
* 📝 Extensive in-code comments and docstrings to explain how it works behind the scenes.
✅ Supported Formats
---------------------
* `Even/Odd binary parity `_
* `CRC `_
* `GS1 Standards `_
* EAN-8/13
* GDTI
* GLN
* SSCC
* UPC-A/E
* etc. *(all fixed length numeric GS1 data structures with a check digit)*
* `ISBN-10/13 `_
* `Luhn `_
* `Verhoeff `_
For each of these formats, we provide functions to validate them and calculate missing digits.
Do you have any formats that you'd like to see supported? 🤔 Feel free to raise an issue,
or even to send a pull request!
✨ Contributors
----------------
This project follows the `all-contributors `_ specification. Contributions of any kind are welcome!
Want to help out? Check out the `contributing page `_.
Thanks goes to these wonderful people (`emoji key `_):
.. raw:: html

Timothy Langer
⚠️ 📖

Charlie Wilson
💻 ⚠️

Max Bowman
💻 ⚠️

Mohsen BANAN
🐛
📙 License
-----------
This project is licensed under `GPL-3.0-or-later `_.