https://github.com/unlobito/pytravelcard
python tools for interacting with ITSO-compliant smartcards
https://github.com/unlobito/pytravelcard
itso nfc public-transportation python smartcard
Last synced: 6 months ago
JSON representation
python tools for interacting with ITSO-compliant smartcards
- Host: GitHub
- URL: https://github.com/unlobito/pytravelcard
- Owner: unlobito
- License: other
- Created: 2019-04-15T18:53:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-19T21:18:51.000Z (over 6 years ago)
- Last Synced: 2025-04-04T16:20:32.316Z (6 months ago)
- Topics: itso, nfc, public-transportation, python, smartcard
- Language: Python
- Homepage: https://lobi.to/talks/papertickets/
- Size: 22.5 KB
- Stars: 14
- Watchers: 6
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# pytravelcard
python tools for interacting with ITSO-compliant smartcards## Supported ITSO Environments
### Chipsets
* MIFARE Classic 4k
* MIFARE DESFire### Products
* TYP2 - Stored Travel Rights
* TYP16 - ITSO shell personalisation
* TYP23 - Pre-defined Specific Journey Ticket## System Requirements
nfc-tools [libfreefare](https://github.com/nfc-tools/libfreefare) must be
installed. A [supported NFC device](http://nfc-tools.org/index.php/Devices_compatibility_matrix)
should also be connected.## Development
### Packaging
Checkout the repository and create a virtualenv using your preferred tooling.
Next, create an ["editable" install](https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs)
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.### cffi bindings
pytravelcard calls native libraries through the
[C Foreign Function Interface for Python](https://cffi.readthedocs.io/en/latest/).
When either of these libraries are updated, the cffi bindings should be rebuilt
to facilitate access to new API calls.After checking out [libfreefare](https://github.com/nfc-tools/libfreefare) and
[libnfc](https://github.com/nfc-tools/libnfc) in the project directory, run `make`
and the `libfreefare_build.py` scripts to prepare and compile the native bindings.