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

Uploaded Source

Built Distribution

poe_async_client-0.0.6-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: poe_async_client-0.0.6.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

Hashes for poe_async_client-0.0.6.tar.gz
Algorithm Hash digest
SHA256 9298612c472dcdb5974d14fc7dea9baca389766e71b7599fc7065b9ed459be76
MD5 c7171546800b7007440bdf94f0e91149
BLAKE2b-256 24fc28a880e100abb3527e31588cbadd14ea1f315a7823e227b9771d7d527ea5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for poe_async_client-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0f5018053b5f8e6a2f13d426955b5cabfb902fb1b77992e8ed02155089d230da
MD5 5b427ef4159420a64dc100822d3e1073
BLAKE2b-256 be5235a993885cf104621661cfbbc12cf36a9956d8b468952f53692c7de6b2b8

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