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.dev2.tar.gz (29.4 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.dev2-py3-none-any.whl (68.8 kB view details)

Uploaded Python 3

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

Hashes for pumpkin_api_py-0.1.0.dev2.tar.gz
Algorithm Hash digest
SHA256 860d1c4d105bb2fe6c02c6f1bb29736576ec9a6634cea6b743d3a03c9450b2b6
MD5 e42e84207591b76377a75a01cd8389a7
BLAKE2b-256 beac852fa624138018f4408f0af14f55b621c706a1dd15efa23a75f7d895557e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pumpkin_api_py-0.1.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc867076a18aa3056cd62a4af4d090cc1fd5331acc655ce3928cd9657fbb82cc
MD5 7b6d5c64a291b3fecc8fe86f4c60fc48
BLAKE2b-256 e1f56badf2f403024ad3cbaca9e2e18fea4b7b244c2a2017b3ad85ddff8e0eb6

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