Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Commit 585d41a

Browse files
authored
Migrate to Codeberg
1 parent ce316ba commit 585d41a

File tree

1 file changed

+2
-76
lines changed

1 file changed

+2
-76
lines changed

README.md

Lines changed: 2 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,2 @@
1-
EMV for Python
2-
==============
3-
4-
![Tests](https://github.com/russss/python-emv/workflows/Tests/badge.svg)
5-
6-
A Pythonic implementation of the EMV smartcard protocol, which is used
7-
worldwide for chip-and-PIN payments. This is intended to be readable,
8-
tested, and heavily cross-referenced with the appropriate sections of the
9-
[EMV Specification](http://www.emvco.com/specifications.aspx).
10-
11-
This also includes an implementation of the `EMV CAP` (aka Pinsentry)
12-
standard which is known to work for Barclays cards.
13-
14-
Installation
15-
------------
16-
17-
You'll need the pcsc smartcard libraries on your system in order to build the
18-
smartcard bindings. On Ubuntu:
19-
20-
sudo apt-get install build-essential swig libpcsclite-dev python-pip python-devel
21-
22-
Then you can install emv from pip:
23-
24-
sudo pip install emv
25-
26-
To check if everything's working, plug in a smartcard reader, put a bank
27-
card in, and run:
28-
29-
emvtool info
30-
31-
If all goes well, you should see some data about your card.
32-
33-
Warning
34-
-------
35-
36-
Although this tool has been relatively well tested, it's technically possible
37-
to block or even damage your card, as well as get in trouble with your card
38-
issuer, using this tool. Please make sure you understand the risks.
39-
40-
Commands marked in the `--help` output with [!] will initiate a transaction
41-
on the card, resulting in a permanent change to the card's internal state
42-
which could potentially be detected by your card issuer, particularly if you
43-
initiate many transactions.
44-
45-
Command Line
46-
------------
47-
48-
This library ships with `emvtool` - a simple command-line tool for testing
49-
and CAP password generation. To fetch some card metadata, run:
50-
51-
emvtool info
52-
53-
If you have more than one smartcard reader (or smartcard-like devices, such as a YubiKey)
54-
connected, you may have to select a specific reader. List all the readers with:
55-
56-
emvtool readers
57-
58-
Then use the `-r` option to select the specific reader ID, e.g.:
59-
60-
emvtool -r 1 info
61-
62-
To generate an EMV CAP one-time passcode:
63-
64-
emvtool -p <PIN> cap
65-
66-
You can also conduct CAP signing and challenge-response:
67-
68-
emvtool -p <PIN> cap -c <challenge>
69-
emvtool -p <PIN> cap -c <accountno> -a <amount>
70-
71-
Legal Stuff
72-
-----------
73-
74-
`EMV` is a trademark of [EMVCo](http://www.emvco.com/) and is used
75-
purely for descriptive purposes. This library is not affiliated with
76-
EMVCo.
1+
> [!IMPORTANT]
2+
> This repository has been migrated to Codeberg at [https://codeberg.org/russss/python-emv](https://codeberg.org/russss/python-emv)

0 commit comments

Comments
 (0)