All Projects → mick88 → samp-client

mick88 / samp-client

Licence: MIT license
GTA SA-MP API client library for Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to samp-client

docker-rcon-web-admin
A Docker image that runs rcon-web-admin
Stars: ✭ 34 (+61.9%)
Mutual labels:  rcon, rcon-client
rconsharp
rconsharp is a Valve RCON protocol implementation written in C# targeting netstandard 2.1
Stars: ✭ 43 (+104.76%)
Mutual labels:  rcon, rcon-client
rcon-cli
A little RCON cli based on james4k's RCON library for golang
Stars: ✭ 108 (+414.29%)
Mutual labels:  rcon, rcon-client
AdminTools
AdminTools for minecraft - rcon and status for mc server and mojang api-s
Stars: ✭ 18 (-14.29%)
Mutual labels:  rcon, rcon-client
pawn-requests
pawn-requests provides an API for interacting with HTTP(S) JSON APIs.
Stars: ✭ 56 (+166.67%)
Mutual labels:  sa-mp
icecon
Simple and quick to use RCON tool for IW4M and other Q3-compatible game servers.
Stars: ✭ 32 (+52.38%)
Mutual labels:  rcon
rcon-web-admin
Self hosted, online RCON administration tool for your game server.
Stars: ✭ 70 (+233.33%)
Mutual labels:  rcon
csgo-rcon-nodejs
A web panel to control a CS:GO server
Stars: ✭ 46 (+119.05%)
Mutual labels:  rcon
samp-discord-plugin
SA:MP Discord Rich Presence plugin
Stars: ✭ 63 (+200%)
Mutual labels:  sa-mp
samp-foreach
foreach standalone include (non y_iterate version)
Stars: ✭ 20 (-4.76%)
Mutual labels:  sa-mp
gta-open
A gamemode made for open.mp, using open.mp naming conventions and best coding practices!
Stars: ✭ 59 (+180.95%)
Mutual labels:  sa-mp
Minecraft-Server-Status
✅一个用于显示服务器在线信息及其他内容的网站
Stars: ✭ 22 (+4.76%)
Mutual labels:  rcon
gta-samp-mouse-only
Play GTA San Andreas Multiplayer with mouse only and no keyboard
Stars: ✭ 22 (+4.76%)
Mutual labels:  sa-mp
mctools
Minecraft Connection Tools - Python implementations of common Minecraft protocols.
Stars: ✭ 27 (+28.57%)
Mutual labels:  rcon
eSelection
Dynamic model selection library for SA-MP servers
Stars: ✭ 28 (+33.33%)
Mutual labels:  sa-mp
UE4-DedicatedServer
A UE4 plugin which adds proper console support (input) and RCon
Stars: ✭ 40 (+90.48%)
Mutual labels:  rcon
SmartCMD
fast and feature rich command processor
Stars: ✭ 18 (-14.29%)
Mutual labels:  sa-mp
samp-plugin-jit
JIT plugin for SA-MP server (JIT compiler for Pawn 3.2)
Stars: ✭ 52 (+147.62%)
Mutual labels:  sa-mp
rkon-core
Source RCON Protocol Java library
Stars: ✭ 62 (+195.24%)
Mutual labels:  rcon
aio-mc-rcon
An asynchronous RCON client/wrapper for Minecraft Java Edition
Stars: ✭ 30 (+42.86%)
Mutual labels:  rcon

GTA SA-MP client

RCON and query client library for Python

A modern Python library for querying and managing SA-MP servers.

Supported Python version 3.6 or newer. If you require support for Python 2.7, install 2.1 version of the package.

Installation

pip install samp-client

Usage

The library can be easily interfaced using a single SampClient class:

from samp_client.client import SampClient

with SampClient(address='localhost', port=7777) as client:
    print(client.get_server_info())

The library also allows you to run RCON commands as well as queries:

from samp_client.client import SampClient

with SampClient(address='localhost', port=7777, rcon_password='password') as client:
    client.rcon_cmdlist()

Query and RCON responses are parsed into native Python structures:

from samp_client.client import SampClient

with SampClient(address='localhost', port=7777, rcon_password='password') as client:
    info = client.get_server_info()
    print(info)
    # ServerInfo(password=True, players=9, max_players=100, hostname='Convoy Trucking', gamemode='Convoy Trucking 3.1.1', language='English')
    print(info.gamemode)
    # 'Convoy Trucking 3.1.1'
    print(client.rcon_get_hostname())
    # ServerVar(name='hostname', value='Convoy Trucking', read_only=False)
    print(client.rcon_players()[0].ping)
    # 26

Examples

Folder example/ contains usage example of the library

Running tests

To run tests:

python -m unittest discover -v
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].