Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 549 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 549 Bytes

PyLuhn

pypi

Basic Implementation for Luhn AlgorithmUseful for Verifying Credit Cards.

Installation

Use pip install pyluhn or python setup.py install.

Usage

verify checks whether the given string is a valid Luhn string in the given base. By default, base is 10:

>>> from pyluhn import verify
>>> verify('5105105105105100') # MasterCard Test Card
True
>>> verify('5105105105105101') # Test Number
False