Skip to main content

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

  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=[],
        )

    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

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pumpkin_api_py-0.1.0.dev3-py3-none-any.whl (70.8 kB view details)

Uploaded Python 3

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

Hashes for pumpkin_api_py-0.1.0.dev3.tar.gz
Algorithm Hash digest
SHA256 c75eb90e652e35502b70b4d8b409c5b77fe9179a5ef9ee66cd846c98b1a34d22
MD5 32571e97af421176f43963c6074c4270
BLAKE2b-256 6b7048dd978a5dfd1f16d8e28ca58ac4de422be6e4106e081ff07f1bf2998360

See more details on using hashes here.

File details

Details for the file pumpkin_api_py-0.1.0.dev3-py3-none-any.whl.

File metadata

File hashes

Hashes for pumpkin_api_py-0.1.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 654aea908ac717563f5b6dec431bb533a789056e77535a7874ebf68bf33116ea
MD5 b04eb9d7dcec9c9fe10fd64cb84fd0ab
BLAKE2b-256 29c693f09bd0e8c6934434e29df520755d85acca6f2b81fc957e9e71e0898326

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page