{"id":34595871,"url":"https://github.com/code-127/luhn-formula-py","last_synced_at":"2026-04-06T07:01:59.099Z","repository":{"id":57698112,"uuid":"499919410","full_name":"code-127/luhn-formula-py","owner":"code-127","description":"Another python package of number validator and check digit generator based on Luhn's formula 😉. Luhn's formula was designed to protect against accidental input errors.","archived":false,"fork":false,"pushed_at":"2025-12-24T09:57:46.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-25T23:11:52.401Z","etag":null,"topics":["luhn","luhn-algorithm","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-127.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-06-04T19:32:19.000Z","updated_at":"2025-12-24T09:38:58.000Z","dependencies_parsed_at":"2024-01-10T11:43:59.096Z","dependency_job_id":"1e714547-0dd1-4cfb-bba1-7fc0d22509c1","html_url":"https://github.com/code-127/luhn-formula-py","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/code-127/luhn-formula-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-127%2Fluhn-formula-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-127%2Fluhn-formula-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-127%2Fluhn-formula-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-127%2Fluhn-formula-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-127","download_url":"https://codeload.github.com/code-127/luhn-formula-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-127%2Fluhn-formula-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31463015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["luhn","luhn-algorithm","python","python3"],"created_at":"2025-12-24T11:37:56.110Z","updated_at":"2026-04-06T07:01:59.094Z","avatar_url":"https://github.com/code-127.png","language":"Python","readme":"# luhn-formula\nAnother python package of number validator and check digit generator based on Luhn's formula 😉. Luhn's formula was designed to protect against accidental input errors.\n\n![Licence](https://img.shields.io/github/license/code-127/luhn-formula-py)\n![PyPI](https://img.shields.io/pypi/v/luhn-formula?label=pypi%20luhn-formula)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/luhn-formula)\n[![Python package](https://github.com/code-127/luhn-formula-py/actions/workflows/python-package.yml/badge.svg)](https://github.com/code-127/luhn-formula-py/actions/workflows/python-package.yml)\n[![Upload Python Package](https://github.com/code-127/luhn-formula-py/actions/workflows/python-publish.yml/badge.svg)](https://github.com/code-127/luhn-formula-py/actions/workflows/python-publish.yml)\n\n[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-3100/)\n[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/)\n[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/)\n[![Python 3.13](https://img.shields.io/badge/python-3.13-blue.svg)](https://www.python.org/downloads/release/python-3130/)\n[![Python 3.14](https://img.shields.io/badge/python-3.14-blue.svg)](https://www.python.org/downloads/release/python-3140/)\n\n## Usage\n### install\n    pip install luhn-formula\n    \nor\n    \n    git clone git@github.com:code-127/luhn-formula-py.git\n### Example\n    \u003e\u003e\u003e from luhnformula import luhnformula as lf\n    \u003e\u003e\u003e lf.getcheckdigit(\"12345\")\n    '5'\n    \u003e\u003e\u003e lf.addcheckdigit(\"12345\")\n    '123455'\n    \u003e\u003e\u003e lf.isvalid(\"123455\")\n    True\n## Function\n### checksum(number: str) -\u003e int\n    Checksum vith the luhn formula\n    Args:\n        number : Number to calculate\n    return:\n        Result of luhn formula\n    \n### isvalid(number: str) -\u003e bool:\n    Validate number with the Luhn formula.\n    Args:\n        number: Number to validate.\n    Returns:\n        ``True`` when the: number is valid, otherwise ``False``.\n### getcheckdigit(number: str) -\u003e str:\n    Generate check digit with the Luhn formula for a number.\n    Args:\n        number: Number used to generate the check digit.\n    Return:\n        the check digit for a number.\n    Raise error:\n        ValueError : Invalid number.\n### addcheckdigit(number: str) -\u003e str:\n    Generate and add check digit with the luhn formula for a number\n    Args:\n        number: Number used to generate the check digit.\n    Return:\n        the number with the check digit.\n    Raise error:\n        ValueError : Invalid number.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-127%2Fluhn-formula-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-127%2Fluhn-formula-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-127%2Fluhn-formula-py/lists"}