Skip to main content

luhn

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

or append for convenience

>>> append('53461861341123')
'534618613411234'

Metadata

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)

Source distribution for luhn 0.2.0
File Size Uploaded Provenance
luhn-0.2.0.tar.gz 1.7 kB Without provenance 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

Security for luhn 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page