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')
True
>>> verify('534618613411236')
False

and use generate to produce them

>>> generate('53461861341123')
4

Project details


Download files

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

Source Distribution

luhn-0.1.1.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file luhn-0.1.1.tar.gz.

File metadata

  • Download URL: luhn-0.1.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for luhn-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fb1f52640c7009c9b4cef5115bbbfb16e7c78aa58a47e4c646716950caf64489
MD5 4b63911647a9140c7da2e6fd9a014c3c
BLAKE2b-256 aa6481fdfeabd901cd6fae47937e2bfc1686670dcf93c09393e20f08b141bec4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page