Writing Python plugins
A Python plugin is a Python module with an interface specified in the Python stub file of the embedded albert
module. A minimal working example of a Python plugin:
import albert
md_iid = '2.4'
md_version = '1.0'
md_name = 'My Plugin'
md_description = 'Does fancy things'
class Plugin(albert.PluginInstance):
pass
Due to the different type systems, multiple inheritance of extension interfaces is not supported. However, multiple extensions can be added using albert.PluginInstance.(de)registerExtension
.
What’s next?
From here on it depends on the interface you want to implement.
- Read the Python stub file.
- See the official Python plugins for reference.
- In case of questions see the C++ API.
- Join the community chats.
- Build something cool and share it.