{"id":15372609,"url":"https://github.com/ousret/payment-card-identifier","last_synced_at":"2025-04-15T12:31:56.662Z","repository":{"id":57451175,"uuid":"97493244","full_name":"Ousret/payment-card-identifier","owner":"Ousret","description":"A Python library for determining credit card type.","archived":false,"fork":false,"pushed_at":"2017-08-05T16:17:07.000Z","size":24,"stargazers_count":11,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-06T03:35:31.761Z","etag":null,"topics":["amex","card","card-identifier","card-types","credit-card","mastercard","visa"],"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/Ousret.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}},"created_at":"2017-07-17T15:43:52.000Z","updated_at":"2025-01-16T06:35:05.000Z","dependencies_parsed_at":"2022-09-26T17:31:29.965Z","dependency_job_id":null,"html_url":"https://github.com/Ousret/payment-card-identifier","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ousret%2Fpayment-card-identifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ousret%2Fpayment-card-identifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ousret%2Fpayment-card-identifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ousret%2Fpayment-card-identifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ousret","download_url":"https://codeload.github.com/Ousret/payment-card-identifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072319,"owners_count":21208170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["amex","card","card-identifier","card-types","credit-card","mastercard","visa"],"created_at":"2024-10-01T13:52:23.219Z","updated_at":"2025-04-15T12:31:56.417Z","avatar_url":"https://github.com/Ousret.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"payment-card-identifier [![Build Status](https://travis-ci.org/Ousret/payment-card-identifier.svg?branch=master)](https://travis-ci.org/Ousret/payment-card-identifier) [![codecov](https://codecov.io/gh/Ousret/payment-card-identifier/branch/master/graph/badge.svg)](https://codecov.io/gh/Ousret/payment-card-identifier)\n-----------------------\n\nPayment card identifier provides a useful utility method for determining a credit card type from both fully qualified numbers.\nSame as braintree/credit-card-type but in Python.\n\n#### Installation\n\n##### From PyPi\n\n```sh\n$ pip install payment-card-identifier\n```\n\n##### From git-master\n\n```sh\n$ git clone https://github.com/Ousret/payment-card-identifier.git\n$ cd payment-card-identifier\n$ python setup.py install\n```\n\n#### How to\n\n```python\nfrom payment_card_identifier import CardIdentifier\n\nmy_card = CardIdentifier.from_numbers('4532040524589053')\n\nprint(my_card)\n# \u003cpayment_card_identifier.card.VISA object at 0x10b336b38\u003e\nprint(my_card.json)\n# {\n#    \"_name\": \"VISA\",\n#    \"_numbers\": \"4532040524589053\",\n#    \"_regex\": \"^4[0-9]{12}(?:[0-9]{3})?$\"\n# }\n```\n\n#### Currently supported cards\n\n- VISA\n- MasterCard\n- Amex\n- BCGLOBAL\n- CarteBlanche\n- DinersClub\n- Discover\n- InstaPayment\n- JCB\n- KoreanLocal\n- Laser\n- Maestro\n- Solo\n- Switch\n- UnionPay\n\n\n#### WiP\n\nThis is still work in progress project.\nCurrently under dev.\n\n*Todo list:*\n\n- Create .from_partials(numbers)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousret%2Fpayment-card-identifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fousret%2Fpayment-card-identifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousret%2Fpayment-card-identifier/lists"}