Generate and verify Luhn check digits
Install with
pip install luhn
Use verify to check digit strings
>>> from luhn import *
>>> verify('356938035643809')
True
>>> verify('534618613411236')
False
and use generate to produce them
>>> generate('53461861341123')
4
or append for convenience
>>> append('53461861341123')
'534618613411234'
Release files for luhn 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| luhn-0.2.0.tar.gz | 1.7 kB | Details |
Release files / luhn-0.2.0.tar.gz
| Download URL | luhn-0.2.0.tar.gz |
|---|---|
| Size | 1.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
917174cecce8bcbbe56ac0d904dbedd06594b21b6f31d5a3ec161d455b0e59f7
|
|
BLAKE2b-256 checksum How to use checksums |
b2de2e989e69fdc81222fd0015f0e9e6899d32e7feea3e5f43267d60a3431163
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |