Skip to content

Repository files navigation

pyut2serverlist

ciLicensePackageLast commit

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.

frompyut2serverlistimportPrincipalServer, Game, Error, Filter, Comparatorprincipal=PrincipalServer('utmaster.openspy.net', 28902, Game.UT2004, 'some-cd-key')
try:
servers=principal.get_servers(
Filter('gametype', Comparator.Equals, 'xDeathMatch')
)
print(servers)
exceptErrorase:
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.

frompyut2serverlistimportServer, Errorserver=Server('68.232.165.172', 7778)
try:
info=server.get_info()
print(info)
exceptErrorase:
print(e)

About

Simple Python library for querying Unreal Engine 2 based principal servers and their game servers

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages