A simple library to get check digit
Project description
Get check digit number of your EAN-13 Barcode.
Here I’m presenting a package to find check digit (system generated digit) of 12 digit number which is used to create EAN-13 Barcode. When we used to create a barcode, the last digit always generated by our machine.In most of the cases, barcode number want to be unique and it is difficult to find if our new barcode number is already existing in our database without knowing this system generated digit and unfortunately I didn’t find any package to find this. That’s why I came accross to build a package to fing this crazy digit.
Installing
pip install check-digit-EAN13
Usage
from check_digit_EAN13.check_digit import get_check_digit
barcode_number = 123456565456
actual_barcode_number = get_check_digit(barcode_number)
print(actual_barcode_number)
output
1234565654562
exceptions
case 1: You can’t use less than 12 digit here
barcode_number = 123456565
actual_barcode_number = get_check_digit(barcode_number)
output
sorry, please enter 12 digits
case 2: You can’t enter any character other than digits here
barcode_number = “123uu45656898895”
actual_barcode_number = get_check_digit(barcode_number)
output
sorry, please enter 12 digit numbers
case 3: If you enter more than 12 digits, package only read 12 digits
barcode_number = 65623546325436473757847549875948
actual_barcode_number = get_check_digit(barcode_number)
output
6562354632541
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
File details
Details for the file check_digit_EAN13-0.2.tar.gz.
File metadata
- Download URL: check_digit_EAN13-0.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fe887b8e5bd3eac3d344567f86da9e378f96d0509e9fe571111db36470f850d
|
|
| MD5 |
a39ee4dcc7f37592862f49136eb31e9d
|
|
| BLAKE2b-256 |
853e8e71ee92c8731b30d2086fdb9e7b78d5c7d0a1051c1ec8e9aa460b350b70
|