{"id":22940579,"url":"https://github.com/mick88/samp-client","last_synced_at":"2025-08-25T00:32:05.840Z","repository":{"id":54400196,"uuid":"94034835","full_name":"mick88/samp-client","owner":"mick88","description":"GTA SA-MP API client library for Python","archived":false,"fork":false,"pushed_at":"2024-08-11T21:16:58.000Z","size":86,"stargazers_count":28,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-14T13:23:47.179Z","etag":null,"topics":["api","api-client","python","python-library","python2","python3","python36","rcon","rcon-client","sa-mp"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mick88.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-11T22:11:16.000Z","updated_at":"2024-07-29T09:47:01.000Z","dependencies_parsed_at":"2022-08-13T14:31:01.544Z","dependency_job_id":null,"html_url":"https://github.com/mick88/samp-client","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mick88%2Fsamp-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mick88%2Fsamp-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mick88%2Fsamp-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mick88%2Fsamp-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mick88","download_url":"https://codeload.github.com/mick88/samp-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230852607,"owners_count":18290081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","python","python-library","python2","python3","python36","rcon","rcon-client","sa-mp"],"created_at":"2024-12-14T13:23:48.125Z","updated_at":"2024-12-22T15:55:22.027Z","avatar_url":"https://github.com/mick88.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GTA SA-MP client \n\n## RCON and query client library for  Python\n\nA modern Python library for querying and managing SA-MP servers.\n \nSupported Python version 3.6 or newer. \nIf you require support for Python 2.7, install 2.1 version of the package.\n\n### Installation\n```bash\npip install samp-client\n```\n\n### Usage\nThe library can be easily interfaced using a single `SampClient` class:\n\n```python\nfrom samp_client.client import SampClient\n\nwith SampClient(address='localhost', port=7777) as client:\n    print(client.get_server_info())\n```\n\nThe library also allows you to run RCON commands as well as queries:\n```python\nfrom samp_client.client import SampClient\n\nwith SampClient(address='localhost', port=7777, rcon_password='password') as client:\n    client.rcon_cmdlist()\n```\n\nQuery and RCON responses are parsed into native Python structures:\n```python\nfrom samp_client.client import SampClient\n\nwith SampClient(address='localhost', port=7777, rcon_password='password') as client:\n    info = client.get_server_info()\n    print(info)\n    # ServerInfo(password=True, players=9, max_players=100, hostname='Convoy Trucking', gamemode='Convoy Trucking 3.1.1', language='English')\n    print(info.gamemode)\n    # 'Convoy Trucking 3.1.1'\n    print(client.rcon_get_hostname())\n    # ServerVar(name='hostname', value='Convoy Trucking', read_only=False)\n    print(client.rcon_players()[0].ping)\n    # 26\n```\n\n\n### Examples\nFolder `example/` contains usage example of the library\n\n### Running tests\nTo run tests:\n```bash\npython -m unittest discover -v\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmick88%2Fsamp-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmick88%2Fsamp-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmick88%2Fsamp-client/lists"}