Python module for near field communicationΒΆ

Release v1.0 dev

The nfcpy module implements NFC Forum specifications for wireless short-range data exchange with NFC devices and tags. It is written in Python and aims to provide an easy-to-use yet powerful framework for Python applications. The software is licensed under the EUPL.

To send a web link to a smartphone:

>>> import nfc, nfc.snep, threading
>>> connected = lambda llc: threading.Thread(
>>> uri = nfc.ndef.Message(nfc.ndef.UriRecord(""))
>>> clf = nfc.ContactlessFrontend('usb')
>>> llc = clf.connect(llcp={'on-connect': connected})
>>> nfc.snep.SnepClient(llc).put(uri)
>>> clf.close()