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

Uploaded Source

Built Distribution

hltv_async_api-0.2.4-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file hltv_async_api-0.2.4.tar.gz.

File metadata

  • Download URL: hltv_async_api-0.2.4.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.4.tar.gz
Algorithm Hash digest
SHA256 34c05e345bea698bcacc743dac3ae7e886ebad43047ad8d7b44c3a9334822df1
MD5 5e5e795ed575c14fff60869c84dd4b50
BLAKE2b-256 c71ad816f348786fcdc36f6835ae61efdb0c9440ed82999e2e6747e71b47f7a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hltv_async_api-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9731a6369d6aac39fc50220147a83980f3d31cbe4f314372673dc559d9195f30
MD5 1703023f483548022e01b71eba0b80d6
BLAKE2b-256 53464ca387743db4e72a5985d35d75f846e62e259e0c3699369a110b449343d9

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