Skip to content

3. Plugins

Roderick Gadellaa edited this page Dec 21, 2015 · 6 revisions

Overview

Nfcpyr supports plugins, which are native python scripts that must implement a certain structure to be compatible. This enables users and other developers to extend on Nfcpyr's functionality without having to make changes in its code.


Adding an extension

Simply copy a Nfcpyr compatible plugin into the /nfcpyr/plugin folder and it will be imported on startup. Then add the name of the plugin (filename without the .py extension) in the plugins list of the event where you want it to be executed. A plugin should have a method for every Nfcpyr event (on_scan, on_checkin, etc) which will be called when the corresponding event is fired.


Building your own extension

See nfcpyr/plugins/examplePlugin.py for an example:

https://github.com/rejhgadellaa/nfcpyr/blob/master/src/python/nfcpyr/plugins/pluginExample.py

Clone this wiki locally