factorio-rcon-py
A simple Factorio RCON client
What it is and what it does
factorio-rcon-py is a lightweight Python client for the Factorio game server's RCON (Remote Console) protocol. It lets you connect to a running Factorio server and send commands programmatically—useful for automation, monitoring, or scripting server administration tasks. The library provides both synchronous and asynchronous APIs; the sync version is available by default, and async support (via anyio) can be added as an optional extra.
The package has no runtime dependencies in its base form, making it quick to install. It exposes low-level packet send/receive methods for custom protocol handling, but most users will use the higher-level send_command() and send_commands() methods. Both sync and async clients support context managers for clean resource management.
Use it for:
- Automate Factorio server administration tasks like restarting, saving, or running console commands from external scripts.
- Build monitoring dashboards or bots that query server state and respond to in-game events via RCON.
- Integrate Factorio servers into larger game infrastructure or orchestration systems that require programmatic control.
- Write async server management tools that handle multiple Factorio instances concurrently using asyncio or trio.
- Develop custom mods or tools that need to communicate with a running Factorio server without modifying the game itself.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for connecting to and sending commands to Factorio game servers via RCON protocol, with optional async support.
Yes, if you need to control a Factorio server programmatically. The package is stable, has no external dependencies, and covers the core RCON protocol well. The dormant maintenance (last commit 786 days ago) is a minor concern for long-term compatibility, but the protocol is unlikely to change frequently. Suitable for automation and scripting tasks; less suitable if you need active upstream support.
Install
factorio-rcon-py on PyPI
pip
pip install factorio-rcon-pyuv
uv add factorio-rcon-pypoetry
poetry add factorio-rcon-pyInstalling factorio-rcon-py
Before you install
Low install friction with no runtime dependencies in the base package. Maintenance is dormant—last commit was 2024-06-19, over 786 days ago—but the repository is not archived and the package is marked Production/Stable.
License in practice
Licensed under LGPLv2 (copyleft). You must disclose source code modifications and distribute under the same license if you redistribute the package or derivative works.
Quickstart
pip install factorio-rcon-py
import factorio_rcon
client = factorio_rcon.RCONClient("127.0.0.1", 12345, "password")
response = client.send_command("/help")
client.close()
Requires Python 3.8 or later. Async support requires installing the anyio extra (pip install factorio-rcon-py[async]).
Verify before relying
- Whether dormant maintenance (last commit 786 days ago) poses a risk for future Factorio protocol changes or Python compatibility.
- Whether the 41 GitHub stars and 74,621 monthly downloads reflect active production use or historical adoption.
Package facts
| License | not declared (copyleft) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 786 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,621/month — #14,810 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: factorio_rcon_py-2.1.3-py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
switchbot-apiAn async Python library for controlling…
permissive · top 15,000 on PyPI
python-jsonrpc-serverImplements a JSON RPC 2.0 server that handles…
unclear · top 15,000 on PyPI
anyioAnyIO provides a unified asynchronous API that…
permissive · top 100 on PyPI
sqlite-anyioProvides an asynchronous client for SQLite that…
permissive · top 15,000 on PyPI
async-extensionsProvides utilities and abstractions built on…
permissive · top 15,000 on PyPI
aioharmonyaioharmony is an asyncio library for…
permissive · top 15,000 on PyPI
telnetlib3Telnet server, client, and protocol library for…
permissive · top 5,000 on PyPI
python-socksProvides SOCKS4(a), SOCKS5(h), and HTTP CONNECT…
permissive · top 5,000 on PyPI
anysqliteAnysqlite wraps SQLite with an async/await…
unclear · top 5,000 on PyPI
pythonpingSends ICMP ping requests to remote hosts from…
permissive · top 15,000 on PyPI