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.5.tar.gz
(9.4 kB
view details)
Built Distribution
File details
Details for the file hltv_async_api-0.2.5.tar.gz
.
File metadata
- Download URL: hltv_async_api-0.2.5.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14224069da69354a8dc308e2eb8503acec533423a92ad516146caa7cb161980b |
|
MD5 | 7e2d7bb5e38a8be8bf6e8f4d8fb8e969 |
|
BLAKE2b-256 | c7132900738583315dabfada17ebde9b60773b780bbbb3190f13f7420ead682d |
File details
Details for the file hltv_async_api-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: hltv_async_api-0.2.5-py3-none-any.whl
- Upload date:
- Size: 21.0 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 | 49cb94d61ad49c99e0abe45b48db5684a7d04e6eb6faf4d4d7e0e9b5360ec66a |
|
MD5 | 496468fa58a94a217d8563b80b3b9a17 |
|
BLAKE2b-256 | 58315a9b5e3be6a4a2006f90a1293f25cd595f936d11b3aff0d5f4af1e4b0cba |