pysrcds
pysrcds copied to clipboard
Python library for interacting with Source engine dedicated servers. This is no longer actively developed.
pysrcds
Python library for interacting with Source engine dedicated servers.
pysrcds provides the functionality to communicate with a dedicated server via RCON and also provides the ability to parse Source engine logs. There are also some utility classes that may be useful for developing other Source related functionality.
Python 2.7 and Python 3.5+ are supported.
Installation
pip install pysrcds
HL Log Parsing
For a log parsing example see goonpug-trueskill.
RCON Usage
from srcds.rcon import RconConnection
conn = RconConnection('127.0.0.1', port=27015, password='password')
response = conn.exec_command('status')
# Response content can be accessed via str(response) or response.body
# Response content will be a utf-8 encoded string in most cases, but it may depend on the
# server type.
# For servers that do not support multipart RCON responses like factorio,
# enable the single_packet_mode option
factorio_conn = RconConnection('127.0.0.1', single_packet_mode=True)
License
pysrcds is distributed under the MIT license. See LICENSE.md for more information.