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.dev2.tar.gz
(29.4 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.dev2.tar.gz.
File metadata
- Download URL: pumpkin_api_py-0.1.0.dev2.tar.gz
- Upload date:
- Size: 29.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
860d1c4d105bb2fe6c02c6f1bb29736576ec9a6634cea6b743d3a03c9450b2b6
|
|
| MD5 |
e42e84207591b76377a75a01cd8389a7
|
|
| BLAKE2b-256 |
beac852fa624138018f4408f0af14f55b621c706a1dd15efa23a75f7d895557e
|
File details
Details for the file pumpkin_api_py-0.1.0.dev2-py3-none-any.whl.
File metadata
- Download URL: pumpkin_api_py-0.1.0.dev2-py3-none-any.whl
- Upload date:
- Size: 68.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 |
bc867076a18aa3056cd62a4af4d090cc1fd5331acc655ce3928cd9657fbb82cc
|
|
| MD5 |
7b6d5c64a291b3fecc8fe86f4c60fc48
|
|
| BLAKE2b-256 |
e1f56badf2f403024ad3cbaca9e2e18fea4b7b244c2a2017b3ad85ddff8e0eb6
|