{ "info": { "author": "iTecX", "author_email": "matteovh@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# DiSwarm Handler\nBasic DiSwarm bot handling class, and standardized communication protocol\n\n## Usage\nMain class: `Handler(channel, token, swarm_id, bot_id, lead_timeout=5, role=None)`\nChannel: Discord server channel to run swarm in\nToken: Discord bot token\nSwarm_id: Unique id of entire swarm\nBot_id: Unique id of bot\nLead_timeout: Seconds before bot declares itself swarm leader\nRole: Role in swarm. Changing this from None overrides leader/drone selection.\n\n\nSubclass this, and redefine the function `process_one(self, response)` to perform different tasks based on input. This is much like the `socketserver.BaseRequestHandler.handle()` method.\n\nOther functions:\n`request(req, args=())` Requests data from swarm. \nReq: Request text\nArgs: tuple of arguments to pass to swarm\n\n`process()`: Processes swarm queue and returns list of `process_one()` outputs\n\n## Notes\n- Swarm ID: the same for all bots in your swarm, but it should be unique from any other swarm, at least on your swarm channel. To be safe, use a randomly generated string or number. Make sure every bot in your swarm has the same id, because bots with different ids cannot see eachother's messages.\n\n## Requires\n- `pip install DiSwarm` (Will install all dependencies\n\nAs an alternative, run `pip install diswarm-handler` to download this and all dependencies.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/iTecAI/DiSwarm/tree/master/diswarm-handler", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "diswarm-handler", "package_url": "https://pypi.org/project/diswarm-handler/", "platform": "", "project_url": "https://pypi.org/project/diswarm-handler/", "project_urls": { "Homepage": "https://github.com/iTecAI/DiSwarm/tree/master/diswarm-handler" }, "release_url": "https://pypi.org/project/diswarm-handler/1.1/", "requires_dist": [ "DiSwarm" ], "requires_python": "", "summary": "Handler for DiSwarm", "version": "1.1" }, "last_serial": 4715350, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "ebbf01acc76fcd9471eee158e265a05c", "sha256": "4a3d43879c9ec8ef7afcde503ddba3c82af3d152d2972d4d1b208fa40ccf10ba" }, "downloads": -1, "filename": "diswarm_handler-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ebbf01acc76fcd9471eee158e265a05c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3336, "upload_time": "2019-01-19T11:27:44", "url": "https://files.pythonhosted.org/packages/e1/33/afe2752482cc133c2c7d2c48c7bfa23126af319755cce45e898171284240/diswarm_handler-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c3254c4730d675bcfb06ff468c59c2f", "sha256": "577f71d4aa4a46ef0ad90d6977d013bfcb1ccbf43713f9a26378bbcd398bd34f" }, "downloads": -1, "filename": "diswarm-handler-1.1.tar.gz", "has_sig": false, "md5_digest": "9c3254c4730d675bcfb06ff468c59c2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2204, "upload_time": "2019-01-19T11:27:46", "url": "https://files.pythonhosted.org/packages/94/41/1284e10391b32b012103b005cf803cdee699f15a5c2c450bc2b66e6b7477/diswarm-handler-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ebbf01acc76fcd9471eee158e265a05c", "sha256": "4a3d43879c9ec8ef7afcde503ddba3c82af3d152d2972d4d1b208fa40ccf10ba" }, "downloads": -1, "filename": "diswarm_handler-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ebbf01acc76fcd9471eee158e265a05c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3336, "upload_time": "2019-01-19T11:27:44", "url": "https://files.pythonhosted.org/packages/e1/33/afe2752482cc133c2c7d2c48c7bfa23126af319755cce45e898171284240/diswarm_handler-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c3254c4730d675bcfb06ff468c59c2f", "sha256": "577f71d4aa4a46ef0ad90d6977d013bfcb1ccbf43713f9a26378bbcd398bd34f" }, "downloads": -1, "filename": "diswarm-handler-1.1.tar.gz", "has_sig": false, "md5_digest": "9c3254c4730d675bcfb06ff468c59c2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2204, "upload_time": "2019-01-19T11:27:46", "url": "https://files.pythonhosted.org/packages/94/41/1284e10391b32b012103b005cf803cdee699f15a5c2c450bc2b66e6b7477/diswarm-handler-1.1.tar.gz" } ] }