Hltv-aio An unofficial asynchronous HLTV API Wrapper for Python
Project description
hltv-async-api an unofficial asynchronous HLTV API Wrapper for Python
Features
-
New and modern fully async library
-
Supports proxy usage for rate-limiting and privacy
-
Automatically changes proxy if access is denied
Installation
pip install hltv_async_api
Simple Usage
from hltv_async_api import Hltv
hltv = Hltv()
live_matches = await hltv.get_live_matches()
Proxy Usage
Load Proxies from list
proxy_list = ['http://120.234.203.171:9002', 'http://110.38.68.38:80']
hltv = Hltv(use_proxy=True, proxy_list=proxy_list)
Load Proxies from file
hltv = Hltv(use_proxy=True, proxy_path='PATH_TO_PROXY.TXT')
Remove bad proxy from file
hltv = Hltv(use_proxy=True, proxy_path='PATH_TO_PROXY.TXT', remove_proxy=True)
Add proxy protocol
proxy_list = ['120.234.203.171:9002', '110.38.68.38:80']
hltv = Hltv(use_proxy=True, proxy_list=proxy_list, proxy_protocol='http')
Examples
Simple Example
from hltv_async_api import Hltv
async def test():
hltv = Hltv()
print(await hltv.get_event_info(7148, 'pgl-cs2-major-copenhagen-2024'))
if __name__ == "__main__":
asyncio.run(test())
Proxy Parser
from hltv_async_api import Hltv
async def test():
hltv = Hltv(debug=True, use_proxy=True, proxy_path='proxy_test.txt', timeout=1, remove_proxy=True, proxy_protocol='http')
print(await hltv.get_event_info(7148, 'pgl-cs2-major-copenhagen-2024'))
if __name__ == "__main__":
asyncio.run(test())
Requirements:
Python 3.9+
License: HLTV Async is licensed under the MIT License, allowing for personal and commercial use with minimal restrictions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hltv_async_api-0.2.6.tar.gz
(9.7 kB
view details)
Built Distribution
File details
Details for the file hltv_async_api-0.2.6.tar.gz
.
File metadata
- Download URL: hltv_async_api-0.2.6.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 339a25d68b9bf50563d7617250e777143577b0655ebef484e36558d7d554c115 |
|
MD5 | a33daea2972aebee2a35c71c4ffd5709 |
|
BLAKE2b-256 | 040e80d0ae405027737323d7faa9d1d00844e5583e83ef648c80f9fa1216d920 |
File details
Details for the file hltv_async_api-0.2.6-py3-none-any.whl
.
File metadata
- Download URL: hltv_async_api-0.2.6-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3be3c4f03aabfeb50d0e0776acbd4ac9cc01022b79cf77877f621e790279782b |
|
MD5 | 82c4dfaa8f66c8636024a56d33987d4e |
|
BLAKE2b-256 | fba1e0baaffa5db675498e5db122ba0a97d1ed1eacfa85981369060dbe4714d9 |