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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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