Registry / http-networking / factorio-rcon-py

factorio-rcon-py

JSON →
library2.1.3pypypi✓ verified 85d ago

A simple Python client for communicating with a Factorio game server via the RCON protocol. Latest version 2.1.3 supports Python >=3.8. Released as needed.

pip install factorio-rcon-py
INSTALL
IMPORT
SIG · FACTORIO-RCON-PY
F
factorio-rcon-py
http-networkingpythonv2.1.3
Install
1.5s avg
Import
19ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.020s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.018s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RCONClient
from factorio_rcon import RCONClient
from factorio_rcon.rcon import RCONClient
Direct import from submodule is wrong; the correct path is factorio_rcon.RCONClient.

Connect to a Factorio server, send an RCON command, and print the response.

from factorio_rcon import RCONClient client = RCONClient('127.0.0.1', 27015, 'password') response = client.send_command('/players') print(response)
Debug
Known issues
gotchaConnecting to a remote server may fail due to firewall or incorrect port. Default Factorio RCON port is 27015.
fix
Ensure the server is reachable and the port is open.
affects: all
gotchaThe client does not automatically reconnect. If the connection drops, create a new RCONClient instance.
fix
Wrap RCONClient usage in a retry logic or recreate the client on failure.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'factorio_rcon'
Library not installed or installed under a different name.
fix
Run 'pip install factorio-rcon-py'.
ConnectionRefusedError: [Errno 111] Connection refused
Server is not running, RCON not enabled, or wrong IP/port.
fix
Verify server is running with RCON enabled and correct port (default 27015).
Upgrade
Version history
2.1.3latest on PyPI · released Jun 19, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
Amazon
1
OpenAI (training)
1
Resources
factorio-rcon-py — pip install factorio-rcon-py · libregistry