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
Metadata
Release files for check-digit-EAN13 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| check_digit_EAN13-0.2.tar.gz | 3.1 kB | Details |
Release files / check_digit_EAN13-0.2.tar.gz
| Download URL | check_digit_EAN13-0.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fe887b8e5bd3eac3d344567f86da9e378f96d0509e9fe571111db36470f850d
|
|
BLAKE2b-256 checksum How to use checksums |
853e8e71ee92c8731b30d2086fdb9e7b78d5c7d0a1051c1ec8e9aa460b350b70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|