Skip to content

Commit a943815

Browse files
committed
Refactor packaging to pyproject.toml and update README
1 parent 7f9057b commit a943815

File tree

5 files changed

+45
-34
lines changed

5 files changed

+45
-34
lines changed

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# factorio-rcon-py
22

3-
A simple factorio RCON client
3+
A simple Factorio RCON client
44

55
## Install
66

7-
`pip3 install factorio-rcon-py`
7+
Without async support
8+
`pip install factorio-rcon-py`
9+
10+
With async support
11+
`pip install factorio-rcon-py[async]`
12+
13+
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.
14+
15+
Python 3.7+ is required.
816

917
## Usage
1018

@@ -16,20 +24,19 @@ client = factorio_rcon.RCONClient("127.0.0.1", 12345, "mypassword")
1624
response = client.send_command("/help")
1725
```
1826

19-
All documentation is in the docstrings of each function/class. Currently,
20-
there is no docs website or similar but one is planned.
27+
All documentation is in the docstrings of each class/method.
2128

22-
Asynchronous usage of this module is possible thanks to [anyio](https://github.com/agronholm/anyio). This means that you can use the async client with asyncio, curio and trio. Use the AsyncRCONClient class. More details are in its docstring.
29+
Asynchronous usage of this module is possible thanks to [anyio](https://github.com/agronholm/anyio). This means that you can use the async client with asyncio and trio. Use the AsyncRCONClient class. More details are in its docstring.
2330

24-
Available functions in both classes are (see docstrings for more info):
31+
Available methods in both classes are (see docstrings for more info):
2532
* connect - Connects to the RCON server.
2633
* close - Closes the connection to the RCON server.
2734
* send_packet - Sends a packet to the RCON server.
28-
* receive_packets - Receives a variable number of packets from the RCON server.
35+
* receive_packet - Receives a packet from the RCON server.
2936
* send_command - Sends a single command to the RCON server.
3037
* send_commands - Sends multiple commands to the RCON server.
3138

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

optional-requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[build-system]
2+
requires = ["setuptools>=62.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "factorio-rcon-py"
7+
version = "2.0.0"
8+
description = "A simple Factorio RCON client"
9+
dependencies = []
10+
readme = "README.md"
11+
requires-python = ">=3.7"
12+
license = {file = "LICENSE"}
13+
authors = [
14+
{name = "mark9064"}
15+
]
16+
classifiers = [
17+
"Programming Language :: Python :: 3",
18+
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
19+
"Operating System :: OS Independent",
20+
"Development Status :: 4 - Beta",
21+
"Natural Language :: English"
22+
]
23+
24+
[project.optional-dependencies]
25+
async = [
26+
"anyio>=3.0, <4.0"
27+
]
28+
29+
[project.urls]
30+
homepage = "https://github.com/mark9064/factorio-rcon-py"

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)