SA-MP Forums Archive
[Tool/Web/Other] SA-MP Query and RCON client library for Python - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Tools and Files (https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] SA-MP Query and RCON client library for Python (/showthread.php?tid=635736)



SA-MP Query and RCON client library for Python - mick88 - 12.06.2017

Due to discontinued support/maintenance for sa-mp python client I decided to write my own from scratch.

My library is open-source, and I believe it to be easier to use and result in cleaner Python code. This library can be used to query information about SA-MP server on your website if you're using a Python framework such as Django or flask, or any Python script, inclusing raspberry Pi projects.

Source code is available on GitHub together with example script, and some examples in the readme file:
https://github.com/mick88/samp-client

To install, simply run:
Code:
pip install samp-client
The library implements context manager, so you can easily manage lifecycle of your connection without explicitly calling connect/disconnect:
Code:
with SampClient(address='localhost', port=7777, rcon_password='password') as client:
    print client.rcon_cmdlist()
Features:


Re: SA-MP Query and RCON client library for Python - mick88 - 02.07.2017

The library is now updated to 2.0 - added support for Python 3


Re: SA-MP Query and RCON client library for Python - Dayvison_ - 02.07.2017

Awesome