Pumpkin plugin API for Python
Project description
Pumpkin Plugin API for Python
This package provides everything needed to write a Pumpkin server plugin compiled to WebAssembly using Python.
Quick start
- Install
pumpkin-api-py:
pip install pumpkin-api-py
- Create your plugin (
main.py):
from pumpkin_api import Plugin, context, logging, metadata, register_plugin
PluginMetadata = metadata.PluginMetadata
class MyPlugin(Plugin):
def metadata(self) -> PluginMetadata:
return PluginMetadata(
name="my-python-plugin",
version="0.1.0",
authors=["you"],
description="An example python plugin.",
dependencies=[],
)
def on_load(self, ctx: context.Context) -> None:
logging.log(logging.Level.INFO, "Python plugin loaded!")
register_plugin(MyPlugin)
- Build your plugin into a WebAssembly component:
pumpkin-plugin-build main -o my_plugin.wasm
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pumpkin_api_py-0.1.0.dev3.tar.gz
(30.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pumpkin_api_py-0.1.0.dev3.tar.gz.
File metadata
- Download URL: pumpkin_api_py-0.1.0.dev3.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c75eb90e652e35502b70b4d8b409c5b77fe9179a5ef9ee66cd846c98b1a34d22
|
|
| MD5 |
32571e97af421176f43963c6074c4270
|
|
| BLAKE2b-256 |
6b7048dd978a5dfd1f16d8e28ca58ac4de422be6e4106e081ff07f1bf2998360
|
File details
Details for the file pumpkin_api_py-0.1.0.dev3-py3-none-any.whl.
File metadata
- Download URL: pumpkin_api_py-0.1.0.dev3-py3-none-any.whl
- Upload date:
- Size: 70.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
654aea908ac717563f5b6dec431bb533a789056e77535a7874ebf68bf33116ea
|
|
| MD5 |
b04eb9d7dcec9c9fe10fd64cb84fd0ab
|
|
| BLAKE2b-256 |
29c693f09bd0e8c6934434e29df520755d85acca6f2b81fc957e9e71e0898326
|