class platypush.backend.scard.ScardBackend(atr=None, *args, **kwargs)[source]

Generic backend to read smart cards and NFC tags and trigger an event whenever a device is detected.

Extend this backend to implement more advanced communication with custom smart cards.



  • pyscard (pip install pyscard)
__init__(atr=None, *args, **kwargs)[source]
Parameters:atr – If set, the backend will trigger events only for card(s) with the specified ATR(s). It can be either an ATR string (space-separated hex octects) or a list of ATR strings. Default: none (any card will be detected)

Starts the backend thread. To be implemented in the derived classes if the loop method isn’t defined.