Pumpkin Plugin API for Python
Go to file
2026-08-10 13:59:19 -07:00
.github/workflows Use standard 7 character short hash for artifact names 2026-08-03 18:06:56 -07:00
example Fix examples and update componentize-py to 0.24.0 2026-06-16 10:27:14 -07:00
src/pumpkin_api IPC and AI goals 2026-08-10 13:59:19 -07:00
wit@160251fb0b Sync to Pumpkin-MC/pumpkin-plugin-wit@160251f 2026-08-10 20:12:57 +00: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 Update install instructions and fix version 2026-08-03 16:03:58 -07:00
README.md Update install instructions and fix version 2026-08-03 16:03:58 -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 git+https://github.com/Pumpkin-MC/pumpkin-api-py.git
  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