Pumpkin Plugin API for Python
Go to file
2026-08-03 15:55:17 -07:00
.github/workflows Add rolling-release CI 2026-08-03 15:55:17 -07:00
example Fix examples and update componentize-py to 0.24.0 2026-06-16 10:27:14 -07:00
src/pumpkin_api Fix examples and update componentize-py to 0.24.0 2026-06-16 10:27:14 -07:00
wit@2aacac1f07 Sync to Pumpkin-MC/pumpkin-plugin-wit@2aacac1 2026-07-20 12:40:02 -07:00
.gitignore chore: sync with pumpkin wit 2026-04-15 19:49:18 +02:00
.gitmodules Replace wit/repo submodule of PumpkinMC/Pumpkin with PumpkinMC/pumpkin-plugin-wit (#5) 2026-05-20 11:28:47 +02:00
hatch_build.py Replace wit/repo submodule of PumpkinMC/Pumpkin with PumpkinMC/pumpkin-plugin-wit (#5) 2026-05-20 11:28:47 +02:00
LICENSE first commit 2026-04-14 19:56:27 +02:00
pyproject.toml Add rolling-release CI 2026-08-03 15:55:17 -07:00
README.md Fix examples and update componentize-py to 0.24.0 2026-06-16 10:27:14 -07:00

Pumpkin Plugin API for Python

This package provides everything needed to write a Pumpkin server plugin compiled to WebAssembly using Python.

Quick start

  1. Install pumpkin-api-py:
pip install pumpkin-api-py
  1. 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=[],
            permissions=[]
        )

    def on_load(self, ctx: context.Context) -> None:
        logging.log(logging.Level.INFO, "Python plugin loaded!")

register_plugin(MyPlugin)
  1. Build your plugin into a WebAssembly component:
pumpkin-plugin-build main -o my_plugin.wasm