Skip to main content

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


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.3.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

hltv_async_api-0.2.3-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file hltv-async-api-0.2.3.tar.gz.

File metadata

  • Download URL: hltv-async-api-0.2.3.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

Hashes for hltv-async-api-0.2.3.tar.gz
Algorithm Hash digest
SHA256 27b0c3508eac7c6b2d9363d36b210ef302e6935d050b9f4ffdc28dd84f0a8ead
MD5 bec643a2a45ac7011df29049f5659266
BLAKE2b-256 de99b69fd19ccae24e42dbacc2f0b1df1f6a03a05b5f018b90cc0c6d260a74a8

See more details on using hashes here.

File details

Details for the file hltv_async_api-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for hltv_async_api-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 75d78b34e33359db4791fc5bbd7f5bfded71b43d8ba4788a4b5138c64b9b6b93
MD5 1206f754422add8b8b25086f3d9f1309
BLAKE2b-256 dd807db2e897db882b2542cf2b5562d738944f843c1157d5741f6b087884b5a6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page