Pumpkin Plugin API for Python
Go to file
2026-09-22 17:48:40 -07:00
.github/workflows Fix artifact renaming in CI 2026-09-04 23:58:45 -07:00
example Fix examples and update componentize-py to 0.24.0 2026-06-16 10:27:14 -07:00
src/pumpkin_api Add handle_command_suggestion export 2026-08-27 14:47:26 -07:00
wit@4d7a501943 Sync to Pumpkin-MC/pumpkin-plugin-wit@4d7a501 2026-09-21 16:20:52 +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-APACHE Relicense under MIT OR Apache-2.0 2026-08-15 10:37:44 -07:00
LICENSE-MIT Relicense under MIT OR Apache-2.0 2026-08-15 10:37:44 -07:00
pyproject.toml Bump version to 0.1.1 2026-09-22 17:48:40 -07:00
README.md Bump version to 0.1.0 2026-09-05 08:13:35 +02: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