Simple Python library for querying Unreal Engine 2 based principal servers and their game servers
Project description
pyut2serverlist
Simple Python library for querying Unreal Engine 2 based principal servers and their game servers
Features
- retrieve a list of game servers from an Unreal Engine 2 principal ("master") server
- retrieve info directly from game servers
Installation
Simply install the package via pip.
$ pip install pyut2serverlist
Usage
The following example retrieves and prints a game server list for Unreal Tournament 2004 directly from Epic Games.
from pyut2serverlist import PrincipalServer, Game, Error
principal = PrincipalServer('ut2004master1.epicgames.com', 28902, Game.UT2004, 'some-cd-key')
try:
servers = principal.get_servers()
print(servers)
except Error as e:
print(e)
You can also directly initialize a game server object for a known server and query it to retrieve details such as the current map and game mode.
from pyut2serverlist import Server, Error
server = Server('68.232.165.172', 7778)
try:
info = server.get_info()
print(info)
except Error as e:
print(e)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyut2serverlist-0.1.1.tar.gz
(8.4 kB
view hashes)
Built Distribution
Close
Hashes for pyut2serverlist-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1ec22f83248d2df096ea3644fbcfde87b7327e51dd5e2f59f5f8e79c510cbaa |
|
MD5 | cdc89320af81c0ba2cf8da7611b90d62 |
|
BLAKE2b-256 | 66b4c882b52623e97eb157b31b92c272f34b5a62cd4197d525b9534010818b9a |