summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..9bd4dab
--- /dev/null
+++ b/main.py
@@ -0,0 +1,9 @@
+class Plugin:
+ # A normal method. It can be called from JavaScript using call_plugin_function("method_1", argument1, argument2)
+ async def add(self, left, right):
+ return left + right
+
+
+ # Asyncio-compatible long-running code, executed in a task when the plugin is loaded
+ async def _main(self):
+ pass