rconnet


Namerconnet JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/VordyV/rconnet
SummaryPython RCON client for the Battlefield 2142 server
upload_time2024-04-21 15:09:45
maintainerNone
docs_urlNone
authorVordyV
requires_python>=3.11
licenseNone
keywords rcon client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rconnet
The project is a module for python, and the task of the module is to create a connection to the RCON Battlefield 2142, Battlefield 2 server. Simply put, it is an RCON client.

Main idea of the project was to implement something similar to ORM, as for databases.

It was developed on version python 3.11, it was not tested on other versions.

You can learn more about the module and its API in [Wiki](https://github.com/VordyV/rconnet/wiki)

### Install
`pip install rconnet`

[pypi.org/project/rconnet/](https://pypi.org/project/rconnet/)

### Features
- Separate methods for server management
- Maplist manager
- Settings manager
- Ban manager
- Player manager
- Managers allow you to "objects" manage

### Specifications
- Adminscript - default support
- Battlefield 2142 support (It has not been tested in Battlefield 2, but it can work)

You can do anything with this module, for example, a web banlist, a GUI program, a bot for Discord or telegram. That was the goal, to use a ready-made solution for different purposes.

## Examples
1. Simple output of the server name
```python
from rconnet.rconbf2142 import Default

with Default("127.0.0.1", "super123") as rcon:
    name = rcon.settings.server_name()
    print(name)
    # Battlefield 2142
```
2. View the maplist and install the next map
```python
from rconnet.rconbf2142 import Default

with Default("127.0.0.1", "super123") as rcon:
    maplist = rcon.maplist.list
    print(maplist)
    # {0: Map(name=minsk, gpm=gpm_cq, size=32), 1: Map(name=fall_of_berlin, gpm=gpm_cq, size=32), 2: Map(name=suez_canal, gpm=gpm_ti, size=48)}
    maplist.get(1).set_next()
    rcon.run_next_level()
```
3. Adding a ban to the list
```python
from rconnet.rconbf2142 import Default

with Default("127.0.0.1", "super123") as rcon:
    rcon.banmanager.add_ban("172.123.54.6")
    banlist = rcon.banmanager.list
    print(banlist)
    # [Ban(address=172.123.54.6, period=Perm)]
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/VordyV/rconnet",
    "name": "rconnet",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "rcon client",
    "author": "VordyV",
    "author_email": "vordy.production@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6e/df/fdf4cf23451e762cba8f7f224002e9694e4162a7830f27da986f5f08a630/rconnet-0.0.3.tar.gz",
    "platform": null,
    "description": "# rconnet\r\nThe project is a module for python, and the task of the module is to create a connection to the RCON Battlefield 2142, Battlefield 2 server. Simply put, it is an RCON client.\r\n\r\nMain idea of the project was to implement something similar to ORM, as for databases.\r\n\r\nIt was developed on version python 3.11, it was not tested on other versions.\r\n\r\nYou can learn more about the module and its API in [Wiki](https://github.com/VordyV/rconnet/wiki)\r\n\r\n### Install\r\n`pip install rconnet`\r\n\r\n[pypi.org/project/rconnet/](https://pypi.org/project/rconnet/)\r\n\r\n### Features\r\n- Separate methods for server management\r\n- Maplist manager\r\n- Settings manager\r\n- Ban manager\r\n- Player manager\r\n- Managers allow you to \"objects\" manage\r\n\r\n### Specifications\r\n- Adminscript - default support\r\n- Battlefield 2142 support (It has not been tested in Battlefield 2, but it can work)\r\n\r\nYou can do anything with this module, for example, a web banlist, a GUI program, a bot for Discord or telegram. That was the goal, to use a ready-made solution for different purposes.\r\n\r\n## Examples\r\n1. Simple output of the server name\r\n```python\r\nfrom rconnet.rconbf2142 import Default\r\n\r\nwith Default(\"127.0.0.1\", \"super123\") as rcon:\r\n    name = rcon.settings.server_name()\r\n    print(name)\r\n    # Battlefield 2142\r\n```\r\n2. View the maplist and install the next map\r\n```python\r\nfrom rconnet.rconbf2142 import Default\r\n\r\nwith Default(\"127.0.0.1\", \"super123\") as rcon:\r\n    maplist = rcon.maplist.list\r\n    print(maplist)\r\n    # {0: Map(name=minsk, gpm=gpm_cq, size=32), 1: Map(name=fall_of_berlin, gpm=gpm_cq, size=32), 2: Map(name=suez_canal, gpm=gpm_ti, size=48)}\r\n    maplist.get(1).set_next()\r\n    rcon.run_next_level()\r\n```\r\n3. Adding a ban to the list\r\n```python\r\nfrom rconnet.rconbf2142 import Default\r\n\r\nwith Default(\"127.0.0.1\", \"super123\") as rcon:\r\n    rcon.banmanager.add_ban(\"172.123.54.6\")\r\n    banlist = rcon.banmanager.list\r\n    print(banlist)\r\n    # [Ban(address=172.123.54.6, period=Perm)]\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python RCON client for the Battlefield 2142 server",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/VordyV/rconnet"
    },
    "split_keywords": [
        "rcon",
        "client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77e47f5dec8364ddbaaee470afb3420415dfe8fd193e6a2043aff47f3f68c6a2",
                "md5": "1d1efcbfd66e711bc1836277483be9d5",
                "sha256": "88d400e5a0200f4543f7d48fe74c5df02356982f5fd00cc17f0276e953917e00"
            },
            "downloads": -1,
            "filename": "rconnet-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d1efcbfd66e711bc1836277483be9d5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 12584,
            "upload_time": "2024-04-21T15:09:43",
            "upload_time_iso_8601": "2024-04-21T15:09:43.862036Z",
            "url": "https://files.pythonhosted.org/packages/77/e4/7f5dec8364ddbaaee470afb3420415dfe8fd193e6a2043aff47f3f68c6a2/rconnet-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6edffdf4cf23451e762cba8f7f224002e9694e4162a7830f27da986f5f08a630",
                "md5": "7a0490a7993b1369f82f523af81df1e4",
                "sha256": "dea37ba78c9a29f22d986432d9d2f01392cf2a608d9e6267686401dfe373cffd"
            },
            "downloads": -1,
            "filename": "rconnet-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "7a0490a7993b1369f82f523af81df1e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 11087,
            "upload_time": "2024-04-21T15:09:45",
            "upload_time_iso_8601": "2024-04-21T15:09:45.563462Z",
            "url": "https://files.pythonhosted.org/packages/6e/df/fdf4cf23451e762cba8f7f224002e9694e4162a7830f27da986f5f08a630/rconnet-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-21 15:09:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "VordyV",
    "github_project": "rconnet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "rconnet"
}
        
Elapsed time: 0.23840s