Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

little_a2s-0.6.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

little_a2s-0.6.0-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file little_a2s-0.6.0.tar.gz.

File metadata

  • Download URL: little_a2s-0.6.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for little_a2s-0.6.0.tar.gz
Algorithm Hash digest
SHA256 12e189f8d820b92e7a4d9df5cd44f6cda0c79fffa30bdf4d2850024a7798faab
MD5 142f5e6bae00c9d24c7353fab88f4928
BLAKE2b-256 3bc4ca7c9a5d4bcfe4dcdc21568ba9d5500f993817f5f9c232def6b542395146

See more details on using hashes here.

Provenance

The following attestation bundles were made for little_a2s-0.6.0.tar.gz:

Publisher: publish.yml on thegamecracks/little-a2s

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file little_a2s-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: little_a2s-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for little_a2s-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5cc5c6e8398e66ad9533e8bbf5bbe611e3fdeeb968451fbfac498e451ed7d800
MD5 1bdb6ad4f5eaf1dbb1094a99a245b466
BLAKE2b-256 2586edcd86c86c9bd3d352d6c6be717167301a335a753983a650d9ebf73762d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for little_a2s-0.6.0-py3-none-any.whl:

Publisher: publish.yml on thegamecracks/little-a2s

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page