{ "info": { "author": "Ado1928", "author_email": "ado.gamer123@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "\n# pydustry\nA Python package for controlling Mindustry servers and getting their current status\n\n## Documentation:\n\n\n`pydustry.server(host, server_port = 6567, socketinput_port = 6859)`\n\n**Server object.**\n - `host` - **String.** Required. IP address of the server\n - `server_port` - **Int.** Defaults at 6567. Port of the server.\n - `socketinput_port` - **Int**. Defaults at 6859. Socketinput port of the server.\n#\n `pydustry.server.get_status()`\n\nReturns the status of the server in the form of a dict.\n\nExample:\n\n `>>> pydustry.server(\"exampleserver.com\").get_status() `\n\twill output\n\n {\"name\": \"Example Mindustry server\",\n \"map\": \"Maze\",\n \"players\": 5, \n \"wave\": 10, \n \"version\": 89, \n \"vertype\": \"official\"}\n\n\n - `\"name\"` - **String.** Name of the server.\n - `\"map\"` - **String.** Map that the server is currently on.\n - `\"players\"` - **Int.** Number of players online.\n - `\"wave\"` - **Int**. Wave that the server is currently on.\n - `\"version\"` - **Int.** Version that the server is on\n - `\"vertype\"` - **String.** Version type of the server.\n#\n`pydustry.server.send_command(command)`\nSends a command through the **socketinput** port of the server.\n - `command` - **String.** Required. Command that gets sent to the server\n #\n `pydustry.server.get_ping()`\n Returns the **delay** it takes packets to come to the server and back in miliseconds **(ping)**.\n- `ping` - **Int.**\n#\n ## Example codes\n\n\n import pydustry\n\n # A program that will output the playercount and ping\n\n host = input(\"Enter the IP address of the Mindustry server:\")\n port = input(\"Enter the port of the Mindustry server:\")\n\n server = pydustry.server(host, int(port))\n\n playercount = server.get_status()[\"players\"]\n ping = server.ping()\n\n print(\"The number of players is: \" + str(playercount))\n print(\"And the ping is: \" + str(ping))\n#\n import pydustry, time\n\n # A program that will autosave the local server every 5 minutes\n\n server = pydustry.server(\"localhost\")\n\n while True:\n server.send_command(\"save 0\")\n server.send_command(\"say Saved!\")\n time.sleep(300)\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/ado1928/pydustry/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pydustry", "package_url": "https://pypi.org/project/pydustry/", "platform": "", "project_url": "https://pypi.org/project/pydustry/", "project_urls": { "Homepage": "https://github.com/ado1928/pydustry/" }, "release_url": "https://pypi.org/project/pydustry/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "A package for getting Mindustry server status and sending commands.", "version": "0.0.2" }, "last_serial": 5896096, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "d42f4cd36facb870beb92ab71673758e", "sha256": "cfd073b990b727b7485ed7b111c7af4c23c5cfd181ebc2203e58ae08c4e894c7" }, "downloads": -1, "filename": "pydustry-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d42f4cd36facb870beb92ab71673758e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3389, "upload_time": "2019-09-27T13:22:29", "url": "https://files.pythonhosted.org/packages/2c/b0/9ab4c861455c181302ac4057059752ebf040f73338a2dbf3b82db55882ff/pydustry-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "36a63cb57226542ceb95e3f1dc69265d", "sha256": "f80947453d91f5c3596e6d7d0446695a27d908132df663d3c48b945b99bdedaf" }, "downloads": -1, "filename": "pydustry-0.0.2.tar.gz", "has_sig": false, "md5_digest": "36a63cb57226542ceb95e3f1dc69265d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2444, "upload_time": "2019-09-27T13:22:31", "url": "https://files.pythonhosted.org/packages/54/6c/c44f5a770aa7d964c020e893c688cafff417fc5b4b95bc830b0a49666a9d/pydustry-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d42f4cd36facb870beb92ab71673758e", "sha256": "cfd073b990b727b7485ed7b111c7af4c23c5cfd181ebc2203e58ae08c4e894c7" }, "downloads": -1, "filename": "pydustry-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d42f4cd36facb870beb92ab71673758e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3389, "upload_time": "2019-09-27T13:22:29", "url": "https://files.pythonhosted.org/packages/2c/b0/9ab4c861455c181302ac4057059752ebf040f73338a2dbf3b82db55882ff/pydustry-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "36a63cb57226542ceb95e3f1dc69265d", "sha256": "f80947453d91f5c3596e6d7d0446695a27d908132df663d3c48b945b99bdedaf" }, "downloads": -1, "filename": "pydustry-0.0.2.tar.gz", "has_sig": false, "md5_digest": "36a63cb57226542ceb95e3f1dc69265d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2444, "upload_time": "2019-09-27T13:22:31", "url": "https://files.pythonhosted.org/packages/54/6c/c44f5a770aa7d964c020e893c688cafff417fc5b4b95bc830b0a49666a9d/pydustry-0.0.2.tar.gz" } ] }