Skip to content

thegamecracks/little-a2s

Repository files navigation

little-a2s

A sync + async + sans-I/O library for the Valve Source Query (A2S) protocol.

from little_a2s import A2S, AsyncA2S

with A2S.from_addr("example.com", 27015, timeout=1) as a2s:
    print(a2s.info())
    print(a2s.players())
    print(a2s.rules())

addr = ("127.0.0.1", 27015)
async with AsyncA2S.from_ipv4() as a2s, asyncio.timeout(1):
    info = await a2s.info(addr)
    players = await a2s.players(addr)
    rules = await a2s.rules(addr)

Read the documentation or see the examples directory to get started!

Installation

The minimum Python version required is 3.11. No other dependencies are required.

This package can be installed from PyPI using one of the following commands:

# Linux/MacOS
python3 -m pip install little-a2s

# Windows
py -m pip install little-a2s

To install the development version of the library (requires Git), you can download it from GitHub directly:

pip install git+https://github.com/thegamecracks/little-a2s

License

This project is written under the MIT License.

About

A sync + async + sans-I/O library for the Valve Source Query (A2S) protocol.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages