Skip to main content
# Pycards

[![Build Status](https://travis-ci.org/MrLucasCardoso/pycards.svg?branch=master)](https://travis-ci.org/MrLucasCardoso/pycards) [![Code Health](https://landscape.io/github/MrLucasCardoso/pycards/master/landscape.svg?style=flat)](https://landscape.io/github/MrLucasCardoso/pycards/master) [![Coverage Status](https://coveralls.io/repos/github/MrLucasCardoso/pycards/badge.svg?branch=master)](https://coveralls.io/github/MrLucasCardoso/pycards?branch=master)

Set of classes for validating, identifying and formatting do credit cards and debit cards.

```shell
$ pip install python-cards
```

#### Example

```python
from pycards import CreditCard

card = CreditCard(number='375371850275506',
cardholder='Charles Smith',
expire_month='3',
expire_year='2017',
code=2887)

if card.is_valid:

print(card.brand) # Amex
print(card.cardholder) # Charles Smith
print(card.number) # 375371850275506
print('Expires: {} ({})' # Expires: 03/17 (2017-03-01)
.format(card.expires_string, card.expires))
print('{}: {}' # CVV: 2887
.format(card.code_name, card.code))
if card.is_expired:
print('EXPIRED') # EXPIRED
```

**Note:** Debit cards not avaliable yet.

### Supported Cards

* Visa -> Visa
* American Expiress -> Amex
* Mastercard -> Master
* Discover -> Discover
* Diners Club -> Diners
* JCB (Japan Credit Bureau) -> JCB
* Aura -> Aura
* ELO -> Elo

Metadata

Release files for python-cards 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-cards 1.3
File Size Uploaded Provenance Actions
python-cards-1.3.tar.gz 5.9 kB Without provenance Details for python-cards-1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-cards 1.3
File Interpreter ABI Platform Actions
python_cards-1.3-py3-none-any.whl Python 3 none any Details for python_cards-1.3-py3-none-any.whl

Total release size: 18.9 kB

Release files / python-cards-1.3.tar.gz

Download URL python-cards-1.3.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6a34e120d211cd01b6c801891b16d2b976051b0dac73e2578166a18b29441a85
BLAKE2b-256 checksum
How to use checksums
a8f52a64c56bb55104912a8f8e85b3eb6c4b2f3f5d62054bc3503ca6550e2a9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / python_cards-1.3-py3-none-any.whl

Download URL python_cards-1.3-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7824b76870ab157ba2f3fabdd90be17b36cbdeb3448676c7d0a86e22a104e31b
BLAKE2b-256 checksum
How to use checksums
3cff12e77365601e4734a52825c90a4b672a616414ee4d34e208c1d6d8b11f05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for python-cards 1.3

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

1.3 This release

2 release files 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