python tools for interacting with ITSO-compliant smartcards
- MIFARE Classic 4k
- MIFARE DESFire
- TYP2 - Stored Travel Rights
- TYP16 - ITSO shell personalisation
- TYP23 - Pre-defined Specific Journey Ticket
nfc-tools libfreefare must be installed. A supported NFC device should also be connected.
Checkout the repository and create a virtualenv using your preferred tooling. Next, create an "editable" install for the module through pip.
$ pip install --editable=.
You will now be able to run pytravelcard
from the command line and Python will
execute your local codebase.
pytravelcard calls native libraries through the C Foreign Function Interface for Python. When either of these libraries are updated, the cffi bindings should be rebuilt to facilitate access to new API calls.
After checking out libfreefare and
libnfc in the project directory, run make
and the libfreefare_build.py
scripts to prepare and compile the native bindings.