Skip to content

Commit eb5f8e6

Browse files
committed
I messed up the readme
1 parent 12e384d commit eb5f8e6

File tree

2 files changed

+92
-20
lines changed

2 files changed

+92
-20
lines changed

README.rst

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ SteamQuery allows you to gather information about a steam server and return it i
55

66
Installing
77
----------
8+
Installing via pip
89

910
.. code-block:: bash
10-
$ pip install steamquery
11+
12+
$ pip install steamquery
1113
1214
How to use
1315
----------
16+
Standard use
1417

15-
SteamQuery is very simple to use
1618
.. code-block:: python
19+
1720
>>> from steam import SteamQuery
1821
>>> server_obj = SteamQuery("serverip", port)
1922
>>> return_dictionary = server_obj.return_last_data() # This will store the last results so you dont need to query again
@@ -24,37 +27,40 @@ SteamQuery is very simple to use
2427
>>> return_dictionary["players"]
2528
>>> 10 # Example as the dictionary above just has 'players'
2629
27-
2830
If the server is offline
31+
2932
.. code-block:: python
33+
3034
>>> from steam import SteamQuery
3135
>>> server_obj = SteamQuery("serverip", port)
3236
>>> return_dictionary = server_obj.return_last_data()
3337
>>> return_dictionary
3438
>>> {'online': False, 'error': 'Request timed out'}
3539
3640
Timeout has a default value of 1 second, however a different integer can be passed
41+
3742
.. code-block:: python
43+
3844
>>> from steam import SteamQuery
3945
>>> server_obj = SteamQuery("serverip", port, 2) # 2 seconds
4046
41-
42-
**The return will be a dictionary, the keys and types for the dictionary are as follows**
43-
* online: Boolean
44-
* ip: String
45-
* port: Integer
46-
* name: String
47-
* map: String
48-
* game: String
49-
* description: String
50-
* players: Integer
51-
* max_players: Integer
52-
* bots: Integer
53-
* password_required: Boolean
54-
* vac_secure: Boolean
55-
* server_type: String (Dedicated/Non*Dedicated/SourceTV)
56-
* os: String (Windows/Linux/Mac)
47+
What it returns
48+
---------------
49+
- online: Boolean
50+
- ip: String
51+
- port: Integer
52+
- name: String
53+
- map: String
54+
- game: String
55+
- description: String
56+
- players: Integer
57+
- max_players: Integer
58+
- bots: Integer
59+
- password_required: Boolean
60+
- vac_secure: Boolean
61+
- server_type: String (Dedicated/Non-Dedicated/SourceTV)
62+
- os: String (Windows/Linux/Mac)
5763

5864
Note
5965
----
60-
This was made for python 3 and has no support for python 2
66+
This was made for python 3 and has no support for python 2

index.rst

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
SteamQuery
2+
==========
3+
4+
SteamQuery allows you to gather information about a steam server and return it in a dictionary format
5+
6+
Installing
7+
----------
8+
Installing via pip
9+
10+
.. code-block:: bash
11+
12+
$ pip install steamquery
13+
14+
How to use
15+
----------
16+
Standard use
17+
18+
.. code-block:: python
19+
20+
>>> from steam import SteamQuery
21+
>>> server_obj = SteamQuery("serverip", port)
22+
>>> return_dictionary = server_obj.return_last_data() # This will store the last results so you dont need to query again
23+
# OR
24+
>>> return_dictionary = server_obj.query_game_server() # New results, also saved and can be retrieved via the return_last_data method
25+
>>> return_dictionary
26+
>>> {'online': True, 'ip': 'ip', 'port': port, 'name': 'name', 'map': 'map', 'game': 'game', 'description': 'server desc', 'players': players, 'max_players': slots, 'bots': bots, 'password_required': bool, 'vac_secure': bool, 'server-type': 'type', 'os': 'os'}
27+
>>> return_dictionary["players"]
28+
>>> 10 # Example as the dictionary above just has 'players'
29+
30+
If the server is offline
31+
32+
.. code-block:: python
33+
34+
>>> from steam import SteamQuery
35+
>>> server_obj = SteamQuery("serverip", port)
36+
>>> return_dictionary = server_obj.return_last_data()
37+
>>> return_dictionary
38+
>>> {'online': False, 'error': 'Request timed out'}
39+
40+
Timeout has a default value of 1 second, however a different integer can be passed
41+
42+
.. code-block:: python
43+
44+
>>> from steam import SteamQuery
45+
>>> server_obj = SteamQuery("serverip", port, 2) # 2 seconds
46+
47+
What it returns
48+
---------------
49+
- online: Boolean
50+
- ip: String
51+
- port: Integer
52+
- name: String
53+
- map: String
54+
- game: String
55+
- description: String
56+
- players: Integer
57+
- max_players: Integer
58+
- bots: Integer
59+
- password_required: Boolean
60+
- vac_secure: Boolean
61+
- server_type: String (Dedicated/Non-Dedicated/SourceTV)
62+
- os: String (Windows/Linux/Mac)
63+
64+
Note
65+
----
66+
This was made for python 3 and has no support for python 2

0 commit comments

Comments
 (0)