Skip to main content

A simple Factorio RCON client

Project description


A simple Factorio RCON client


Without async support pip install factorio-rcon-py

With async support pip install factorio-rcon-py[async]

Async support is available as soon as the required dependency (anyio) is installed, so pip install factorio-rcon-py anyio is mostly equivalent, but not recommended due to dependency versioning.

Python 3.7+ is required.



import factorio_rcon

client = factorio_rcon.RCONClient("", 12345, "mypassword")
response = client.send_command("/help")

All documentation is in the docstrings of each class/method.

Asynchronous usage of this module is possible thanks to anyio. This means that you can use the async client with asyncio and trio. Use the AsyncRCONClient class. More details are in its docstring.

Available methods in both classes are (see docstrings for more info):

  • connect - Connects to the RCON server.
  • close - Closes the connection to the RCON server.
  • send_packet - Sends a packet to the RCON server.
  • receive_packet - Receives a packet from the RCON server.
  • send_command - Sends a single command to the RCON server.
  • send_commands - Sends multiple commands to the RCON server.

The methods for sending/receiving packets are available in case you want to write your own packet handlers, but in most cases you will never need to touch these and can use send_command(s).


Thanks to Truman Kilen for the initial code / idea.



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

factorio-rcon-py-2.0.1.tar.gz (29.2 kB view hashes)

Uploaded source

Built Distribution

factorio_rcon_py-2.0.1-py3-none-any.whl (26.3 kB view hashes)

Uploaded py3

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