Hltv-aio An unofficial asynchronous HLTV API Wrapper for Python
Project description
Hltv-aio 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-aio
Simple Usage
from hltv-aio 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
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
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.2.tar.gz
(9.5 kB
view details)
Built Distribution
File details
Details for the file hltv-async-api-0.2.2.tar.gz
.
File metadata
- Download URL: hltv-async-api-0.2.2.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 121ea62620420723644d2a06e97613935cda55aa76ae6d93a0cf5e45f6160d40 |
|
MD5 | f25888de793df3ea3ee2fc8a29e4905a |
|
BLAKE2b-256 | 5150a0474dedee984bb2dffc85b0b15f0a0396759615bdef34576052ae8fa13b |
File details
Details for the file hltv_async_api-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: hltv_async_api-0.2.2-py3-none-any.whl
- Upload date:
- Size: 14.9 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 | a480211110052f5438dfc1c37ca12dffda71d43130ba9674b15a08e435d03109 |
|
MD5 | a69f95072fb9711495c1c7438b065da8 |
|
BLAKE2b-256 | 278436f5decdedf2eae29c4d3c96f5e57cf346d372ee299f374da6ee7de63b9c |