Library part of the Lightshield tool.
Project description
Lightshield Tools
Tools and Code-Sections of the Lightshield Framework that were better fit to be provided through dependency rather then included in the main project.
Ratelimiter (WIP)
Multi-Host async ratelimiting service. The clients each sync via a central redis server.
Usage
from lightshield.proxy import Proxy
import aiohttp
async def run():
p = Proxy()
# Initiate the redis connector in async context
await p.init(host='localhost', port=5432)
async with aiohttp.ClientSession(headers={'X-Riot-Token': ''}) as session:
# One-off requests directly through the API object.
await p.request('https://euw1.api.riotgames.com/lol/league-exp/v4/entries/RANKED_SOLO_5x5/SILVER/I', session=session)
# Preselect the Method Ratelimit Zone to skip the selection of corresponding limits
zone = await p.get_endpoint('https://euw1.api.riotgames.com/lol/league-exp/v4/entries/')
for page in range(1, 10):
zone.request('https://euw1.api.riotgames.com/lol/league-exp/v4/entries/RANKED_SOLO_5x5/SILVER/I?page=%s' % page, session)
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
Lightshield-0.1.3b0.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for Lightshield-0.1.3b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eabf22eed95a0d6317635d1226710e43759f921b0226731a97c71aaac72b2be2 |
|
MD5 | 94fbb4043185f7c2d01b2509ffca06d6 |
|
BLAKE2b-256 | 133d761c132f855fcafa0281ccf032a5136643c0a75a57f989191ca11db52477 |