# 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.12, 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.14,>=3.12",
"maintainer_email": null,
"keywords": "rcon, client, modmanager, battlefield",
"author": "Vordy",
"author_email": "61288579+VordyV@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/06/52/d03fe6871e3543b2382219d312aa346c0a9244c46887ec73b64e7c841192/rconnet-0.1.0.tar.gz",
"platform": null,
"description": "# rconnet\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.\n\nMain idea of the project was to implement something similar to ORM, as for databases.\n\nIt was developed on version python 3.12, it was not tested on other versions.\n\nYou can learn more about the module and its API in [Wiki](https://github.com/VordyV/rconnet/wiki)\n\n### Install\n`pip install rconnet`\n\n[pypi.org/project/rconnet/](https://pypi.org/project/rconnet/)\n\n### Features\n- Separate methods for server management\n- Maplist manager\n- Settings manager\n- Ban manager\n- Player manager\n- Managers allow you to \"objects\" manage\n\n### Specifications\n- Adminscript - default support\n- Battlefield 2142 support (It has not been tested in Battlefield 2, but it can work)\n\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.\n\n## Examples\n1. Simple output of the server name\n```python\nfrom rconnet.rconbf2142 import Default\n\nwith Default(\"127.0.0.1\", \"super123\") as rcon:\n name = rcon.settings.server_name()\n print(name)\n # Battlefield 2142\n```\n2. View the maplist and install the next map\n```python\nfrom rconnet.rconbf2142 import Default\n\nwith Default(\"127.0.0.1\", \"super123\") as rcon:\n maplist = rcon.maplist.list\n print(maplist)\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)}\n maplist.get(1).set_next()\n rcon.run_next_level()\n```\n3. Adding a ban to the list\n```python\nfrom rconnet.rconbf2142 import Default\n\nwith Default(\"127.0.0.1\", \"super123\") as rcon:\n rcon.banmanager.add_ban(\"172.123.54.6\")\n banlist = rcon.banmanager.list\n print(banlist)\n # [Ban(address=172.123.54.6, period=Perm)]\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python RCON client for the Battlefield 2142 server",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://github.com/VordyV/rconnet/wiki",
"Homepage": "https://github.com/VordyV/rconnet",
"Repository": "https://github.com/VordyV/rconnet"
},
"split_keywords": [
"rcon",
" client",
" modmanager",
" battlefield"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e25a3627a203bb8a05db6ceabe85aef2f7f0d887f3bad3fc2a27926378194ab9",
"md5": "1e62c6579a0b2a5500d67789ac2f35e3",
"sha256": "f1ed8745ac73fd7eb83fd8fdc9732c1aa8bff122b0d3bdb476799234eb16e81f"
},
"downloads": -1,
"filename": "rconnet-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1e62c6579a0b2a5500d67789ac2f35e3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.12",
"size": 12498,
"upload_time": "2024-12-10T12:59:20",
"upload_time_iso_8601": "2024-12-10T12:59:20.304020Z",
"url": "https://files.pythonhosted.org/packages/e2/5a/3627a203bb8a05db6ceabe85aef2f7f0d887f3bad3fc2a27926378194ab9/rconnet-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0652d03fe6871e3543b2382219d312aa346c0a9244c46887ec73b64e7c841192",
"md5": "e72e905d902d0a3d129413e2c218d6eb",
"sha256": "17a1371d139fec145ddd40e20647fc3d286e24f49078ab78ebcb8451d5d104a6"
},
"downloads": -1,
"filename": "rconnet-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "e72e905d902d0a3d129413e2c218d6eb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.14,>=3.12",
"size": 9848,
"upload_time": "2024-12-10T12:59:22",
"upload_time_iso_8601": "2024-12-10T12:59:22.519105Z",
"url": "https://files.pythonhosted.org/packages/06/52/d03fe6871e3543b2382219d312aa346c0a9244c46887ec73b64e7c841192/rconnet-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-10 12:59:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "VordyV",
"github_project": "rconnet",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "rconnet"
}