mcipc


Namemcipc JSON
Version 2.3.1 PyPI version JSON
download
home_pagehttps://github.com/conqp/mcipc
SummaryA Minecraft server inter-process communication library.
upload_time2021-01-12 09:04:55
maintainer
docs_urlNone
authorRichard Neumann
requires_python>=3.8
licenseGPLv3
keywords minecraft python server rcon query
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Documentation Status](https://readthedocs.org/projects/mcipc/badge/?version=latest)](https://mcipc.readthedocs.io/en/latest/?badge=latest)
[![Bugs](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=bugs)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)
[![Code Smells](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=code_smells)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)
[![Lines of Code](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=ncloc)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)
[![Maintainability Rating](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=sqale_rating)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)
[![Quality Gate Status](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=alert_status)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)
[![Reliability Rating](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=reliability_rating)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)
[![Security Rating](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=security_rating)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)
[![Technical Debt](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=sqale_index)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)
[![Vulnerabilities](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=vulnerabilities)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)

# mcipc
A Minecraft inter-process communication API implementing the [RCON](http://wiki.vg/RCON) and [Query](http://wiki.vg/Query) protocols.

## News

### 2020-12-21 - mcipc-2.0
Great news: `mcipc` is now available in version 2.  
The version 2 update includes the outsourcing of the RCON protocol and client implementation into an [own project](https://github.com/conqp/rcon).  
This allowes for the RCON library to be used independently of mcipc, e.g. for other games which support the RCON protocol.  
Furthermore `mcipc`'s RCON client implementations have been overhauled. They now provide functions to interact with the respective server.  
It was therefor necessary to not have one implementation of `mcipc.rcon.Client`, but three:

*  `mcipc.rcon.be.Client` Client for Bedrock Edition servers.
*  `mcipc.rcon.ee.Client` Client for Education Edition servers.
*  `mcipc.rcon.je.Client` Client for Java Edition servers.

To provide some backwards compatibility, the `mcipc.rcon.Client` is now an alias for `mcipc.rcon.je.Client`.  
You'll find a full documentation of each client's capabilities, i.e. methods in the [documentation](https://mcipc.readthedocs.io/en/latest).

## Requirements
`mcipc` requires Python 3.8 or higher.  
It also depends on [rcon](https://github.com/conqp/rcon) which has been split from this project.  
If you install `mcicp` via `pip`, it will automatically be installed as a dependency.

## Documentation
Documentation is available on [readthedocs](https://mcipc.readthedocs.io/en/latest).

## Quick start

Install mcipc from the [AUR](https://aur.archlinux.org/packages/python-mcipc/) or via:

    pip install mcipc

### Query protocol
The `Query` protcol is used to query a Minecraft server for server information.  
The Minecraft query protocol has two query modes: *basic stats* and *full stats*.

```python
from mcipc.query import Client

with Client('127.0.0.1', 25565) as client:
    basic_stats = client.stats()            # Get basic stats.
    full_stats = client.stats(full=True)    # Get full stats.

print(basic_stats)
print(full_stats)
```

### RCON protocol
The `RCON` protocol is used to remotely control a Minecraft server, i.e. execute
commands on a Minecraft server and receive the respective results.

```python
from mcipc.rcon.je import Biome, Client     # For Java Edition servers.
#from mcipc.rcon.be import Client           # For Bedrock Edition servers.
#from mcipc.rcon.ee import Client           # For Education Edition servers.

with Client('127.0.0.1', 5000, passwd='mysecretpassword') as client:
    seed = client.seed                              # Get the server's seed.
    players = client.list()                         # Get the server's players info.
    mansion = client.locate('mansion')              # Get the next mansion's location.
    badlands = client.locatebiome(Biome.BADLANDS)   # Get the next location of a badlands biome.

print(seed)
print(players)
print(mansion)
print(badlands)
```

Example output of the above commands with a Java Edition client:

```python
-8217057902979500137
Players(online=1, max=20, players=[Player(name='coNQP', uuid=None, state=None)])
Location(name='mansion', x=-7216, y=None, z=-1952, distance=7479)
Location(name='minecraft:badlands', x=1512, y=None, z=3388, distance=3634)
```

## Credits
Many thanks to all contributers to the [Minecraft Wiki](https://minecraft.gamepedia.com/) and the [Wiki.vg](https://wiki.vg/Main_Page).

## License
Copyright (C) 2018-2020 Richard Neumann <mail at richard dash neumann period de>

mcipc is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

mcipc is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with mcipc.  If not, see <http://www.gnu.org/licenses/>.

## Legal
Minecraft content and materials are trademarks and copyrights of
Mojang and its licensors. All rights reserved.
This program is free software and is not affiliated with Mojang.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/conqp/mcipc",
    "name": "mcipc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "minecraft python server rcon query",
    "author": "Richard Neumann",
    "author_email": "mail@richard-neumann.de",
    "download_url": "https://files.pythonhosted.org/packages/1d/5f/ceeb95285061a40c2f2582e86a0158d966c6ceeeb0e940673581ea5f1763/mcipc-2.3.1.tar.gz",
    "platform": "",
    "description": "[![Documentation Status](https://readthedocs.org/projects/mcipc/badge/?version=latest)](https://mcipc.readthedocs.io/en/latest/?badge=latest)\n[![Bugs](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=bugs)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)\n[![Code Smells](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=code_smells)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)\n[![Lines of Code](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=ncloc)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)\n[![Maintainability Rating](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=sqale_rating)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)\n[![Quality Gate Status](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=alert_status)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)\n[![Reliability Rating](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=reliability_rating)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)\n[![Security Rating](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=security_rating)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)\n[![Technical Debt](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=sqale_index)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)\n[![Vulnerabilities](https://sonarqube.richard-neumann.de/api/project_badges/measure?project=mcipc&metric=vulnerabilities)](https://sonarqube.richard-neumann.de/dashboard?id=mcipc)\n\n# mcipc\nA Minecraft inter-process communication API implementing the [RCON](http://wiki.vg/RCON) and [Query](http://wiki.vg/Query) protocols.\n\n## News\n\n### 2020-12-21 - mcipc-2.0\nGreat news: `mcipc` is now available in version 2.  \nThe version 2 update includes the outsourcing of the RCON protocol and client implementation into an [own project](https://github.com/conqp/rcon).  \nThis allowes for the RCON library to be used independently of mcipc, e.g. for other games which support the RCON protocol.  \nFurthermore `mcipc`'s RCON client implementations have been overhauled. They now provide functions to interact with the respective server.  \nIt was therefor necessary to not have one implementation of `mcipc.rcon.Client`, but three:\n\n*  `mcipc.rcon.be.Client` Client for Bedrock Edition servers.\n*  `mcipc.rcon.ee.Client` Client for Education Edition servers.\n*  `mcipc.rcon.je.Client` Client for Java Edition servers.\n\nTo provide some backwards compatibility, the `mcipc.rcon.Client` is now an alias for `mcipc.rcon.je.Client`.  \nYou'll find a full documentation of each client's capabilities, i.e. methods in the [documentation](https://mcipc.readthedocs.io/en/latest).\n\n## Requirements\n`mcipc` requires Python 3.8 or higher.  \nIt also depends on [rcon](https://github.com/conqp/rcon) which has been split from this project.  \nIf you install `mcicp` via `pip`, it will automatically be installed as a dependency.\n\n## Documentation\nDocumentation is available on [readthedocs](https://mcipc.readthedocs.io/en/latest).\n\n## Quick start\n\nInstall mcipc from the [AUR](https://aur.archlinux.org/packages/python-mcipc/) or via:\n\n    pip install mcipc\n\n### Query protocol\nThe `Query` protcol is used to query a Minecraft server for server information.  \nThe Minecraft query protocol has two query modes: *basic stats* and *full stats*.\n\n```python\nfrom mcipc.query import Client\n\nwith Client('127.0.0.1', 25565) as client:\n    basic_stats = client.stats()            # Get basic stats.\n    full_stats = client.stats(full=True)    # Get full stats.\n\nprint(basic_stats)\nprint(full_stats)\n```\n\n### RCON protocol\nThe `RCON` protocol is used to remotely control a Minecraft server, i.e. execute\ncommands on a Minecraft server and receive the respective results.\n\n```python\nfrom mcipc.rcon.je import Biome, Client     # For Java Edition servers.\n#from mcipc.rcon.be import Client           # For Bedrock Edition servers.\n#from mcipc.rcon.ee import Client           # For Education Edition servers.\n\nwith Client('127.0.0.1', 5000, passwd='mysecretpassword') as client:\n    seed = client.seed                              # Get the server's seed.\n    players = client.list()                         # Get the server's players info.\n    mansion = client.locate('mansion')              # Get the next mansion's location.\n    badlands = client.locatebiome(Biome.BADLANDS)   # Get the next location of a badlands biome.\n\nprint(seed)\nprint(players)\nprint(mansion)\nprint(badlands)\n```\n\nExample output of the above commands with a Java Edition client:\n\n```python\n-8217057902979500137\nPlayers(online=1, max=20, players=[Player(name='coNQP', uuid=None, state=None)])\nLocation(name='mansion', x=-7216, y=None, z=-1952, distance=7479)\nLocation(name='minecraft:badlands', x=1512, y=None, z=3388, distance=3634)\n```\n\n## Credits\nMany thanks to all contributers to the [Minecraft Wiki](https://minecraft.gamepedia.com/) and the [Wiki.vg](https://wiki.vg/Main_Page).\n\n## License\nCopyright (C) 2018-2020 Richard Neumann <mail at richard dash neumann period de>\n\nmcipc is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nmcipc is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with mcipc.  If not, see <http://www.gnu.org/licenses/>.\n\n## Legal\nMinecraft content and materials are trademarks and copyrights of\nMojang and its licensors. All rights reserved.\nThis program is free software and is not affiliated with Mojang.\n\n\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "A Minecraft server inter-process communication library.",
    "version": "2.3.1",
    "split_keywords": [
        "minecraft",
        "python",
        "server",
        "rcon",
        "query"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "b5195c5bf7f2a8ecb4e157cb0d927641",
                "sha256": "97c83cc45d782cd6494642724fa72c9756b1be3d1be45010eacf28943c401cf3"
            },
            "downloads": -1,
            "filename": "mcipc-2.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b5195c5bf7f2a8ecb4e157cb0d927641",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 125900,
            "upload_time": "2021-01-12T09:04:53",
            "upload_time_iso_8601": "2021-01-12T09:04:53.736705Z",
            "url": "https://files.pythonhosted.org/packages/f7/00/983299111132edba9b9885efd8b633bd80df03d16df3a77bc562417d2f45/mcipc-2.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "4c40c39f0f905de5a7364f61ce2f8f2f",
                "sha256": "2293937f7f6963a78d8c07412e1d0f89c148e1bd528cb8c8c0a4e3c312dea16f"
            },
            "downloads": -1,
            "filename": "mcipc-2.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4c40c39f0f905de5a7364f61ce2f8f2f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 102092,
            "upload_time": "2021-01-12T09:04:55",
            "upload_time_iso_8601": "2021-01-12T09:04:55.305401Z",
            "url": "https://files.pythonhosted.org/packages/1d/5f/ceeb95285061a40c2f2582e86a0158d966c6ceeeb0e940673581ea5f1763/mcipc-2.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-01-12 09:04:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "conqp",
    "error": "Could not fetch GitHub repository",
    "lcname": "mcipc"
}
        
Elapsed time: 0.21716s