Skip to main content

Python RCON client for the Battlefield 2142 server

Project description

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

Install

pip install 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
  • 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)]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rconnet-0.0.3.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

rconnet-0.0.3-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file rconnet-0.0.3.tar.gz.

File metadata

  • Download URL: rconnet-0.0.3.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for rconnet-0.0.3.tar.gz
Algorithm Hash digest
SHA256 dea37ba78c9a29f22d986432d9d2f01392cf2a608d9e6267686401dfe373cffd
MD5 7a0490a7993b1369f82f523af81df1e4
BLAKE2b-256 6edffdf4cf23451e762cba8f7f224002e9694e4162a7830f27da986f5f08a630

See more details on using hashes here.

File details

Details for the file rconnet-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: rconnet-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for rconnet-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 88d400e5a0200f4543f7d48fe74c5df02356982f5fd00cc17f0276e953917e00
MD5 1d1efcbfd66e711bc1836277483be9d5
BLAKE2b-256 77e47f5dec8364ddbaaee470afb3420415dfe8fd193e6a2043aff47f3f68c6a2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page