Skip to main content

OpenGSQ Python Library

Python Package GitHub license PyPI version Python versions Downloads

The OpenGSQ Python library provides a convenient way to query servers from applications written in the Python language.

Supported Protocols

The library supports a wide range of protocols. Here are some examples:

from opengsq.protocols import (
    AoE1,
    AoE2,
    ASE,
    AVP2,
    Battlefield,
    Battlefield2,
    CoD1,
    CoD4,
    CoD5,
    DirectPlay,
    Doom3,
    ElDewrito,
    EOS,
    FiveM,
    Flatout2,
    GameSpy1,
    GameSpy2,
    GameSpy3,
    GameSpy4,
    Halo1,
    JediKnight,
    Kaillera,
    KillingFloor,
    Minecraft,
    Nadeo,
    Palworld,
    Quake1,
    Quake2,
    Quake3,
    RakNet,
    RenegadeX,
    Samp,
    Satisfactory,
    Scum,
    Source,
    SSC,
    SupCom,
    StrongholdCE,
    StrongholdCrusader,
    TeamSpeak3,
    TrackmaniaNations,
    TrackmaniaSunrise,
    Toxikk,
    UDK,
    Unreal2,
    UT3,
    Vcmp,
    W40kDow,
    Warcraft3,
    WON,
)

Requirements

  • Python 3.9 or higher

Installation

The recommended installation method is using pip:

pip install --upgrade opengsq

Usage

Here’s an example of how to query a server using the Source protocol:

import asyncio
from opengsq.protocols import Source

async def main():
    source = Source(host='45.147.5.5', port=27015)
    info = await source.get_info()
    print(info)

asyncio.run(main())

You can also use the Source Remote Console:

import asyncio
from opengsq.exceptions import AuthenticationException
from opengsq.rcon_protocols.source_rcon import SourceRcon

async def main():
    with SourceRcon("123.123.123.123", 27015) as source_rcon:
        try:
            await source_rcon.authenticate("serverRconPassword")
        except AuthenticationException:
            print('Failed to authenticate')

        response = await source_rcon.send_command("cvarlist")
        print(response)

asyncio.run(main())

Command-line interface

This library additionally provides an opengsq command-line utility which makes it easy to query game servers from your terminal. Run opengsq -h for usage.

# query server using source protocol
opengsq source --host 123.123.123.123 --port 27015 --function get_info

Tests and Results

You can find information about tests and results at https://python.opengsq.com/tests/protocols

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

https://github.com/opengsq/opengsq-python/graphs/contributors

Stargazers over time

Stargazers over time

Metadata

Release files for opengsq 3.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opengsq 3.7.0
File Size Uploaded
opengsq-3.7.0.tar.gz 107.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opengsq 3.7.0
File Interpreter ABI Platform
opengsq-3.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 281.5 kB

Release files / opengsq-3.7.0.tar.gz

Download URL opengsq-3.7.0.tar.gz
Size 107.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d0a7f1d2b97e8710ea4d507231f13ab008b246d1f380bbdb6b816e30f9a0eb38
BLAKE2b-256 checksum
How to use checksums
c2560f3973b73cecdaa8b5995b406f62a6a34798e61082642b8586b03086845e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / opengsq-3.7.0-py3-none-any.whl

Download URL opengsq-3.7.0-py3-none-any.whl
Size 174.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
619e9c0bc4765e1394e5d5809b69108104bcafd487b64d032e55a68186a022ea
BLAKE2b-256 checksum
How to use checksums
d6bfcdbeb6d283640506356511c682619add5bab7a4b9a49e1ab7a09baaef605
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.7.0 This release

2 release files

3.6.2

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.9

2 release files

3.0.8

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page