# Introduction
A library that makes development of Python Minecraft Bedrock Edition websocket applications easier.
# Install
```bash
pip install fcwslib
```
# Demo
```python
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()
```
Raw data
{
"_id": null,
"home_page": "",
"name": "fcwslib",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "python,minecraft,bedrock,websocket",
"author": "",
"author_email": "mingfengpigeon <mingfengpigeon@gmail.org>",
"download_url": "https://files.pythonhosted.org/packages/8e/d7/72cd35eafac5521456398a798f2d8ee3f425d0860f53657019bdca18f562/fcwslib-3.0.0.tar.gz",
"platform": null,
"description": "# Introduction\n\nA library that makes development of Python Minecraft Bedrock Edition websocket applications easier.\n\n# Install\n\n```bash\npip install fcwslib\n```\n\n# Demo\n\n```python\nimport fcwslib\n\n\nclass Plugin(fcwslib.Plugin):\n async def on_connect(self):\n print('Connected')\n await self.send_command('list', callback=self.list)\n await self.subscribe('PlayerMessage', callback=self.player_message)\n\n async def on_disconnect(self):\n print('Disconnected')\n\n async def on_receive(self, response):\n print('Receive other response {}'.format(response))\n\n async def list(self, response):\n print('Receive command response {}'.format(response))\n\n async def player_message(self, response):\n print('Receive event response {}'.format(response))\n\n\nserver = fcwslib.Server()\nserver.add_plugin(Plugin)\nserver.run_forever()\n```\n",
"bugtrack_url": null,
"license": "SEE: https://mingfengpigeon.mit-license.org/",
"summary": "A library that makes development of Python Minecraft Bedrock Edition websocket applications easier.",
"version": "3.0.0",
"split_keywords": [
"python",
"minecraft",
"bedrock",
"websocket"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5f5f70dd59cfd8072bc13e3006f3dc6ccd14308cad61502011d8b2937bef0388",
"md5": "8958df763065355080dcba8c8a290f68",
"sha256": "fc61c8f6c18d9f5108540de427f8fe7dd9211a930e70c35f742071b091195390"
},
"downloads": -1,
"filename": "fcwslib-3.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8958df763065355080dcba8c8a290f68",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3336,
"upload_time": "2023-03-30T16:11:55",
"upload_time_iso_8601": "2023-03-30T16:11:55.369119Z",
"url": "https://files.pythonhosted.org/packages/5f/5f/70dd59cfd8072bc13e3006f3dc6ccd14308cad61502011d8b2937bef0388/fcwslib-3.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8ed772cd35eafac5521456398a798f2d8ee3f425d0860f53657019bdca18f562",
"md5": "a717898353fd95b2166169b3378d8486",
"sha256": "2e1b925310be60c457b8fc5765a611b4efda38b1d8e098ff2ac40dab49c1e987"
},
"downloads": -1,
"filename": "fcwslib-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "a717898353fd95b2166169b3378d8486",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 2882,
"upload_time": "2023-03-30T16:11:57",
"upload_time_iso_8601": "2023-03-30T16:11:57.206814Z",
"url": "https://files.pythonhosted.org/packages/8e/d7/72cd35eafac5521456398a798f2d8ee3f425d0860f53657019bdca18f562/fcwslib-3.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-30 16:11:57",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "fcwslib"
}