Skip to main content

A flexible Minecraft command library

Project description

logo

Mecha

GitHub Actions PyPI PyPI - Python Version Code style: black

A flexible Minecraft command library.

Introduction

This package provides a versatile API for generating Minecraft commands in Python. It uses the beet library to generate functions and integrates natively with the beet pipeline.

from beet import Context
from mecha import Mecha

def my_plugin(ctx: Context):
    mc = ctx.inject(Mecha)

    with mc.function("foo"):
        mc.say("hello")

You can directly create handles from data pack instances. The library can be used on its own without being part of a beet pipeline.

from beet import DataPack
from mecha import Mecha

with DataPack(path="demo") as data:
    mc = Mecha(data)

    with mc.function("foo"):
        mc.say("hello")

Installation

The package can be installed with pip.

$ pip install mecha

License - MIT

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mecha-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

mecha-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file mecha-0.1.0.tar.gz.

File metadata

  • Download URL: mecha-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.5

File hashes

Hashes for mecha-0.1.0.tar.gz
Algorithm Hash digest
SHA256 29c17ebffbacdf300e41ab916493afaa505cfd03c1387d44dd5138e5c38a2cb4
MD5 2d420b6fd84140f61358dbbcba2a5408
BLAKE2b-256 a724d6ba7aa67bb154db74e3a54d3f160174324a076f808bb4a8eb4d334035e5

See more details on using hashes here.

File details

Details for the file mecha-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mecha-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.5

File hashes

Hashes for mecha-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 434b72a95d24cccc931a5dd553fb725d3c9171d1db44b012685462c615e9202b
MD5 a56b46a5d441ef99e1a6779c6016b4b8
BLAKE2b-256 ed9d007ad8a552db8707e4b9a74b4b2c5d328fbb10fc4a95347fe5adee6381c7

See more details on using hashes here.

Supported by

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