-
Notifications
You must be signed in to change notification settings - Fork 3
3. Plugins
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.
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.
See nfcpyr/plugins/examplePlugin.py for an example:
https://github.com/rejhgadellaa/nfcpyr/blob/master/src/python/nfcpyr/plugins/pluginExample.py