Skip to main content

Generate and verify Luhn check digits

Project description

pypi buildstatus coverage

Generate and verify Luhn check digits

Install with

pip install luhn

Use verify to check digit strings

>>> from luhn import *
>>> verify('356938035643809')
>>> verify('534618613411236')

and use generate to produce them

>>> generate('53461861341123')

or append for convenience

>>> append('53461861341123')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for luhn, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size luhn-0.2.0.tar.gz (1.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page