Skip to main content

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

poe_async_client-0.0.4.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

poe_async_client-0.0.4-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file poe_async_client-0.0.4.tar.gz.

File metadata

  • Download URL: poe_async_client-0.0.4.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for poe_async_client-0.0.4.tar.gz
Algorithm Hash digest
SHA256 30d846b3369a66f17548ca49323ae7f42f2b523fa3b0a3f6ad8a98d0e5515e11
MD5 d2bffc00755a1da3f41f1db8e3d31f27
BLAKE2b-256 34200b446a9e407e0d12a76a81f3949ded2d122fb8280f6d44d767608b769119

See more details on using hashes here.

File details

Details for the file poe_async_client-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for poe_async_client-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8ffe2bc9d21221f7da567f6799fe3b8514527f80cdf147b3a52a97fd9971f3ca
MD5 923f48b48389a0ba7798f5d28347e36d
BLAKE2b-256 b1d5c59d148d2f88dc39c8ab66dc9ce7046ea9cd44993b3024d1723084f07979

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