{"id":22004041,"url":"https://github.com/opengsq/opengsq-python","last_synced_at":"2025-05-05T17:22:00.234Z","repository":{"id":57449115,"uuid":"370847838","full_name":"opengsq/opengsq-python","owner":"opengsq","description":"Python library designed for querying game servers. It supports 24 different query protocols and has been downloaded over 34,000 times.","archived":false,"fork":false,"pushed_at":"2024-04-01T09:20:12.000Z","size":1766,"stargazers_count":22,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-25T12:02:39.468Z","etag":null,"topics":["ase","asyncio","doom3","eos","fivem","game","game-server-query","gamespy","minecraft","opengsq","python","quake","server-query","source","teamspeak3","unreal2"],"latest_commit_sha":null,"homepage":"https://python.opengsq.com/","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/opengsq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"BattlefieldDuck"}},"created_at":"2021-05-25T22:58:32.000Z","updated_at":"2024-04-03T01:08:43.000Z","dependencies_parsed_at":"2023-01-21T18:46:36.355Z","dependency_job_id":"257712ed-761d-48da-83c7-073ccca8a63d","html_url":"https://github.com/opengsq/opengsq-python","commit_stats":{"total_commits":96,"total_committers":1,"mean_commits":96.0,"dds":0.0,"last_synced_commit":"a67af3df1b62095a2508af092a570e918f1664e9"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengsq%2Fopengsq-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengsq%2Fopengsq-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengsq%2Fopengsq-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengsq%2Fopengsq-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opengsq","download_url":"https://codeload.github.com/opengsq/opengsq-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227239684,"owners_count":17752498,"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":["ase","asyncio","doom3","eos","fivem","game","game-server-query","gamespy","minecraft","opengsq","python","quake","server-query","source","teamspeak3","unreal2"],"created_at":"2024-11-30T00:12:05.925Z","updated_at":"2025-05-05T17:22:00.222Z","avatar_url":"https://github.com/opengsq.png","language":"Python","funding_links":["https://github.com/sponsors/BattlefieldDuck"],"categories":[],"sub_categories":[],"readme":"# OpenGSQ Python Library\n\n[![Python Package](https://github.com/opengsq/opengsq-python/actions/workflows/python-package.yml/badge.svg)](https://github.com/opengsq/opengsq-python/actions/workflows/python-package.yml)\n[![GitHub license](https://img.shields.io/github/license/opengsq/opengsq-python)](https://github.com/opengsq/opengsq-python/blob/main/LICENSE)\n[![PyPI version](https://img.shields.io/pypi/v/opengsq.svg)](https://pypi.org/project/opengsq/)\n[![Python versions](https://img.shields.io/pypi/pyversions/opengsq.svg)](https://pypi.org/project/opengsq/)\n[![Downloads](https://pepy.tech/badge/opengsq)](https://pepy.tech/project/opengsq)\n\nThe OpenGSQ Python library provides a convenient way to query servers\nfrom applications written in the Python language.\n\n## Supported Protocols\n\nThe library supports a wide range of protocols. Here are some examples:\n\n```py\nfrom opengsq.protocols import (\n    ASE,\n    Battlefield,\n    Doom3,\n    EOS,\n    FiveM,\n    GameSpy1,\n    GameSpy2,\n    GameSpy3,\n    GameSpy4,\n    Kaillera,\n    KillingFloor,\n    Minecraft,\n    Nadeo,\n    Palworld,\n    Quake1,\n    Quake2,\n    Quake3,\n    RakNet,\n    RenegadeX,\n    Samp,\n    Satisfactory,\n    Scum,\n    Source,\n    TeamSpeak3,\n    Toxikk,\n    UDK,\n    Unreal2,\n    UT3,\n    Vcmp,\n    WON,\n)\n```\n\n## Requirements\n\n- Python 3.7 or higher\n\n## Installation\n\nThe recommended installation method is using [pip](http://pip-installer.org/):\n\n```sh\npip install --upgrade opengsq\n```\n\n## Usage\n\nHere’s an example of how to query a server using the Source protocol:\n\n```py\nimport asyncio\nfrom opengsq.protocols import Source\n\nasync def main():\n    source = Source(host='45.147.5.5', port=27015)\n    info = await source.get_info()\n    print(info)\n\nasyncio.run(main())\n```\n\nYou can also use the Source Remote Console:\n\n```py\nimport asyncio\nfrom opengsq.exceptions import AuthenticationException\nfrom opengsq.rcon_protocols.source_rcon import SourceRcon\n\nasync def main():\n    with SourceRcon(\"123.123.123.123\", 27015) as source_rcon:\n        try:\n            await source_rcon.authenticate(\"serverRconPassword\")\n        except AuthenticationException:\n            print('Failed to authenticate')\n\n        response = await source_rcon.send_command(\"cvarlist\")\n        print(response)\n\nasyncio.run(main())\n```\n\n### Command-line interface\n\nThis library additionally provides an `opengsq` command-line utility\nwhich makes it easy to query game servers from your terminal. Run\n`opengsq -h` for usage.\n\n```sh\n# query server using source protocol\nopengsq source --host 123.123.123.123 --port 27015 --function get_info\n```\n\n## Tests and Results\n\nYou can find information about tests and results at [https://python.opengsq.com/tests/protocols](https://python.opengsq.com/tests/protocols)\n\n## Contributing\nContributions are welcome! Please feel free to submit pull requests or open issues.\n\n![https://github.com/opengsq/opengsq-python/graphs/contributors](https://contrib.rocks/image?repo=opengsq/opengsq-python)\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/opengsq/opengsq-python.svg?variant=adaptive)](https://starchart.cc/opengsq/opengsq-python)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengsq%2Fopengsq-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengsq%2Fopengsq-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengsq%2Fopengsq-python/lists"}