--- id: luhn version: "0.2.0" license: MIT license_treatment: permissive maintenance: abandoned --- # luhn — Generate and verify Luhn check digits License: permissive · Maintenance: abandoned · Downloads: 178.4K/mo ## What it is and what it does Luhn is a minimal Python library that implements the Luhn algorithm, a checksum formula used to validate identification numbers like credit card numbers. It provides three functions: `verify()` to check whether a digit string has a valid Luhn check digit, `generate()` to compute the correct check digit for a given number, and `append()` to return the number with its check digit appended. The package has no external dependencies and is straightforward to use. However, it has been abandoned since its single release on 2015-06-23, with no updates for many years. While the algorithm itself is simple and unlikely to change, the lack of maintenance means any compatibility issues with newer Python versions or edge cases would not be addressed by the maintainer. Use it for: - Validate credit card numbers or other financial identifiers that use Luhn checksums before processing. - Generate correct check digits for test data or synthetic credit card numbers in development environments. - Verify the integrity of digit sequences in payment systems or identity verification workflows. - Append Luhn check digits to partial account numbers or identifiers in data generation pipelines. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates and verifies Luhn check digits for digit strings, commonly used to validate credit card numbers and similar identifiers. Yes, but with caution. The package does exactly what it claims and has no known vulnerabilities. MIT licensing is unrestricted. However, it is abandoned and has not been updated since 2015-06-23—install only if you are confident the Luhn algorithm implementation is correct for your use case and you can tolerate no future maintenance. For production payment systems, consider whether a maintained alternative would be safer. ## Install pip install luhn uv add luhn poetry add luhn ## Installing luhn Before you install: High install friction: the package has been abandoned since its only release on 2015-06-23, with no updates in many years. The last repository commit was 2023-03-14, suggesting minimal maintenance. No runtime dependencies, so installation itself is straightforward, but the stagnation raises questions about whether bugs or compatibility issues would be addressed. License in practice: MIT license is permissive and imposes no restrictions on use, modification, or redistribution in commercial or private projects. Quickstart: pip install luhn from luhn import verify, generate, append verify('356938035643809') # True generate('53461861341123') # 4 append('53461861341123') # '534618613411234' Verify before relying: - Whether the package works correctly with modern Python versions, given no updates since 2015-06-23 and no specified Python support in metadata. - Whether the Luhn algorithm implementation matches current standards or has any known edge cases not covered by the fact sheet. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 178.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags luhn check digit validation, credit card number verification, luhn algorithm implementation, generate check digits, verify checksum digit, checksum-validation, financial-data [View on SkillFed](https://skillfed.io/packages/luhn) · [View on PyPI](https://pypi.org/project/luhn/)