Async client to run simultaneous requests against the Path of Exile API without triggering rate limiting
Project description
PoEClient
Async client to run simultaneous requests against the Path of Exile API without triggering rate limiting
Installation
pip install poe-async-client
Example usage
import asyncio
from poe_async_client.poe_client import PoEClient
async def fetch_stash_changes_simultaneously():
client = PoEClient(
max_requests_per_second=5,
user_agent="OAuth myapp/1.0.0 (Contact: Liberatorist@gmail.com)"
)
async with client:
token_response = await client.get_client_credentials(
client_id="myapp",
client_secret="super secret",
scope="service:psapi"
)
token = token_response["access_token"]
simultaneous_requests = [
client.get_public_stashes(token=token)
for _ in range(10)
]
responses = await asyncio.gather(*simultaneous_requests)
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
Built Distribution
File details
Details for the file poe_async_client-0.0.5.tar.gz
.
File metadata
- Download URL: poe_async_client-0.0.5.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a39927a5e985fda8347d1030a77d0311b64d836fd238dca1cd2f6840a6f9b6fe |
|
MD5 | 345b5c06c393de40fdacbd9f32266ad4 |
|
BLAKE2b-256 | 3bc06dfc53cd3f9d250fcfc5233e3e352ebd4806849a49ac08ad02574389506c |
File details
Details for the file poe_async_client-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: poe_async_client-0.0.5-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ce380c53e73240b1970c1f15e254e21811ba18e945c080a9256c9cb8fc07235 |
|
MD5 | 7e7db346a785738a92ec3b9abf86878a |
|
BLAKE2b-256 | 5988a5a1f8a69d2cac5f12ef57119e9031a769885e2d3fbddedc5ac5230b6daf |