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.12, 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
  • 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)]

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.1.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rconnet-0.1.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rconnet-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10

File hashes

Hashes for rconnet-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f3075232b01b482e1f02d476440d57cc0fa93a7ffc44b6981beda20cd531d013
MD5 39c14ce09397734820f71ef6acee28b9
BLAKE2b-256 a67880503e83cd489586aed182784f22f84d057d94bb8bdb4c8749c33bd5a064

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rconnet-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10

File hashes

Hashes for rconnet-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce8a071c1620983fc28ecff0d57706e58855beeca104eac3d1a0ab3c1d8f388b
MD5 bc505a5a91271a8051623ab8d6f6d9b4
BLAKE2b-256 10d17557ce3e36ae2b3be73b951643615cf558e2fb9f595a705983489e342c16

See more details on using hashes here.

Supported by

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