Skip to main content

A better and fixed SA:MP Query Client written in Python

Project description

sampquery

Better, flexible, re-written and fast SA:MP/OMP query server client


Introduction

SA:MP Query it is developed to interact with GTA SA:MP/OpenMP servers, allowing to obtain
important data through mechanisms based on a UDP packet system provided by SA:MP.

[!NOTE]
Learn more about SA:MP Query Mechanisms

Installation

pip install py-sampquery

Usage

import trio
import sampquery as sampq

async def main() -> None:
  server = sampq.SAMPQuery_Client(
    ip='144.217.174.214',
    port=6969
  )
    
  # Getting server information
  server_info = await server.info()
  print(f"Retrieving server data of {server_info.name)
    
  # Players inside
  player_list = await server.players()
  for player in player_list.players:
    print(f"Nickname: {player.name} (Score: {player.score})")

if __name__ == "__main__":
    trio.run(main)

Wanna see some examples? you can check this examples folders.

Contributions

We're open to receiving contributions and improvements for the following enhancements. Feel free to open an issue or create a pull request.

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

py_sampquery-0.0.6.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

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

py_sampquery-0.0.6-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file py_sampquery-0.0.6.tar.gz.

File metadata

  • Download URL: py_sampquery-0.0.6.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for py_sampquery-0.0.6.tar.gz
Algorithm Hash digest
SHA256 655eb41e3e9d1de5320fe430dc646e36230a6458f15d4c314f14c4152fc76abb
MD5 ab13eb9ce2320edce771aa1cf67a95bd
BLAKE2b-256 8fb47fac7e0e64ecedf733e0bacc53b550106349d5950835c2ef266b9bc3313d

See more details on using hashes here.

File details

Details for the file py_sampquery-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: py_sampquery-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for py_sampquery-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 28690ea2818910747e7f87461fe73a016b09e835462eec8f5bf2b40557773161
MD5 1c56fa6801eede177beda676fbd0aea8
BLAKE2b-256 8bf31129782762dc6d52ef56f8fa8e168fe176869bcd909b8b708eb09e1516a7

See more details on using hashes here.

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