A check digit library for data validation
Project description
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 🍎
sudo port install py-checkdigit
PyPi 🐍
pip install checkdigit
✨ Features
PEP 561 compatible, with built in support for type checking.
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
CRC (credit to @sapieninja)
- GS1 Standards (credit to @OtherBarry)
EAN-8/13
GDTI
GLN
SSCC
UPC-A/E
etc. (all fixed length numeric GS1 data structures with a check digit)
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!
🔨 Contributing
Contributing Page: https://checkdigit.rtfd.io/en/latest/contributing.html
Issue Tracker: https://github.com/harens/checkdigit/issues
Source Code: https://github.com/harens/checkdigit
Any change, big or small, that you think can help improve this project is more than welcome 🎉.
As well as this, feel free to open an issue with any new suggestions or bug reports. Every contribution is appreciated.
To find out more, please read our contributing page. Thank you!
📙 License
This project is licensed under GPL-3.0-or-later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for checkdigit-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb15fd2f0da1eaaed8178a2f9f40aaef9c5a06c43f4f84156fddd4998420036a |
|
MD5 | 1acad7325b12d89678a47c118a8f8d35 |
|
BLAKE2b-256 | 94bd4c423a784aeda4ea9093afd07e730be649109f4c2fc06003cc0c765efa4e |