Skip to main content

rconnet


:b: There is an implementation of this module for C# in the form of a DLL library https://github.com/VordyV/rconnet.dotnet


What is this?

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

Install

pip install rconnet
poetry add rconnet

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
  • Modmanager - in the process of implementing the 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
from rconnet.rconbf2142 import Default

with Default("127.0.0.1", "super123") as rcon:
    name = rcon.settings.server_name()
    print(name)
    # Battlefield 2142
  1. View the maplist and install the next map
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()
  1. Adding a ban to the list
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)]

Metadata

Release files for rconnet 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rconnet 0.2.0
File Size Uploaded
rconnet-0.2.0.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rconnet 0.2.0
File Interpreter ABI Platform
rconnet-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / rconnet-0.2.0.tar.gz

Download URL rconnet-0.2.0.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f77c01c5bfde23f0858ad813024c424f09a2d0aafbcac5458fcd660f296ad3ca
BLAKE2b-256 checksum
How to use checksums
7746b64aadea536e39bbcdafb3afa413907c2f5036366e565dd2c3b55cb955bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.10.11 Windows/10

Release files / rconnet-0.2.0-py3-none-any.whl

Download URL rconnet-0.2.0-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8abd12438d8e50df7fc70328a9da7fc6cd1e71280793de68f79bd087e173f43a
BLAKE2b-256 checksum
How to use checksums
f0a6d42d5782bbf57f385d871ce825fce087854949136efb51ba2ca919b0772e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.10.11 Windows/10

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page