Skip to main content

A library that makes development of Python Minecraft Bedrock Edition websocket applications easier.

Project description

Introduction

A library that makes development of Python Minecraft Bedrock Edition websocket applications easier.

Install

pip install fcwslib

Demo

import fcwslib


class Plugin(fcwslib.Plugin):
    async def on_connect(self):
        print('Connected')
        await self.send_command('list', callback=self.list)
        await self.subscribe('PlayerMessage', callback=self.player_message)

    async def on_disconnect(self):
        print('Disconnected')

    async def on_receive(self, response):
        print('Receive other response {}'.format(response))

    async def list(self, response):
        print('Receive command response {}'.format(response))

    async def player_message(self, response):
        print('Receive event response {}'.format(response))


server = fcwslib.Server()
server.add_plugin(Plugin)
server.run_forever()

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

fcwslib-3.0.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

fcwslib-3.0.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file fcwslib-3.0.0.tar.gz.

File metadata

  • Download URL: fcwslib-3.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for fcwslib-3.0.0.tar.gz
Algorithm Hash digest
SHA256 2e1b925310be60c457b8fc5765a611b4efda38b1d8e098ff2ac40dab49c1e987
MD5 a717898353fd95b2166169b3378d8486
BLAKE2b-256 8ed772cd35eafac5521456398a798f2d8ee3f425d0860f53657019bdca18f562

See more details on using hashes here.

File details

Details for the file fcwslib-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: fcwslib-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for fcwslib-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc61c8f6c18d9f5108540de427f8fe7dd9211a930e70c35f742071b091195390
MD5 8958df763065355080dcba8c8a290f68
BLAKE2b-256 5f5f70dd59cfd8072bc13e3006f3dc6ccd14308cad61502011d8b2937bef0388

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