Installation¶
Requirements¶
- Python 3.9 or newer (tested on 3.9 – 3.14)
- pyserial, installed automatically
- Permission to open the reader's serial port. See Hardware & setup.
Install from PyPI¶
Wheels are also published on piwheels,
so pip on Raspberry Pi OS installs without building anything:
Verify the install¶
Then plug in the reader and check that it answers:
from mifarepy import MifareReader
with MifareReader('/dev/ttyUSB0') as reader: # Windows: 'COM3'
print(reader.ping(), reader.get_version())
Install from source¶
git clone https://github.com/SparkDrago05/mifarepy.git
cd mifarepy
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
The dev extra adds pytest, coverage, ruff and mypy. To build the
documentation locally, install the docs extra and run MkDocs:
Next steps¶
- Hardware & setup: find the serial port and fix permissions
- Usage guide: every feature with examples
- Examples: runnable scripts