{"id":16913797,"url":"https://github.com/bombsimon/hltv-python","last_synced_at":"2025-09-07T18:32:17.422Z","repository":{"id":54290601,"uuid":"208169370","full_name":"bombsimon/hltv-python","owner":"bombsimon","description":"📺 HLTV live score implementation with Socket.IO","archived":false,"fork":false,"pushed_at":"2024-11-18T21:56:41.000Z","size":118,"stargazers_count":16,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-24T01:50:17.285Z","etag":null,"topics":["counter-strike","counter-strike-global-offensive","csgo","hacktoberfest","hltv","livescore","scorebot"],"latest_commit_sha":null,"homepage":"","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/bombsimon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-13T00:30:27.000Z","updated_at":"2024-12-17T16:03:51.000Z","dependencies_parsed_at":"2023-01-25T19:16:13.489Z","dependency_job_id":"a285659d-6620-41d5-9b09-683133e357c4","html_url":"https://github.com/bombsimon/hltv-python","commit_stats":{"total_commits":34,"total_committers":2,"mean_commits":17.0,"dds":"0.47058823529411764","last_synced_commit":"4f39491cad2ccf8db216750459b3fc48e0c77279"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombsimon%2Fhltv-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombsimon%2Fhltv-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombsimon%2Fhltv-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombsimon%2Fhltv-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bombsimon","download_url":"https://codeload.github.com/bombsimon/hltv-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232242733,"owners_count":18493786,"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":["counter-strike","counter-strike-global-offensive","csgo","hacktoberfest","hltv","livescore","scorebot"],"created_at":"2024-10-13T19:15:14.348Z","updated_at":"2025-01-02T18:50:48.939Z","avatar_url":"https://github.com/bombsimon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HLTV Livescore\n\nThis is a HLTV livescore implementation in Python. It feels super weird that I\ndon't find any implementations for this but I might be bad at looking. The two\nJavaScript versions I found helped me understand and get inspiration.\n\nBorrowed with pride from:\n\n- [Nols1000/hltv-scorebot](https://github.com/Nols1000/hltv-scorebot)\n- [andrewda/hltv-livescore](https://github.com/andrewda/hltv-livescore) (wraps\n  above linked)\n- [osebrwn/csgo-livescore](https://github.com/josebrwn/csgo-livescore) (wraps\n  above linked)\n\nMight integrate with other Python libraries in the future, such as\n\n- [SocksPls/hltv-api](https://github.com/SocksPls/hltv-api)\n\n## Documentation\n\nGeneral documentation about the Socket.IO streams can be found in\n[DOCUMENTATION.md](DOCUMENTATION.md)\n\n## Live scoring\n\nSo HLTV uses [Socket.IO](https://socket.io/) to stream the data they get from\nValve and ESL (I think?). This data is pushed on a socket. See\n[DOCUMENTATION](DOCUMENTATION.md) for server information.\n\nI actually have a really (really) hard time finding any documentation at all\nregarding this socket. Is it official? Is it documented? How's it rate limited?\nWhat events are pushed, how and when, and with what data? Because of this I've\ntried to document my findings in [DOCUMENTATION.md](DOCUMENTATION.md).\n\n## This implementation\n\nLuckily there's a great library named\n[python-socketio](https://python-socketio.readthedocs.io/en/latest/index.html)\nwhich makes it easy for me to read from the socket. All I need to do after\nconnecting is to parse the stream. ✌🏼\n\n## Usage\n\n```python\nimport asyncio\nfrom scorebot import Livescore\n\nasync def on_kill(frag):\n    print(\"{} killed {}\".format(frag.killer.name, frag.victim.name))\n\nasync def main():\n    ls = Livescore(123456)\n    ls.on(ls.EVENT_KILL, on_kill)\n\n    socket = await ls.socket()\n    await socket.wait()\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nSee [examples](examples/) folder for an implementation creating a kill feed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbombsimon%2Fhltv-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbombsimon%2Fhltv-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbombsimon%2Fhltv-python/lists"}