Skip to main content

No project description provided

Project description

Example:

from asyncio import run
from asyncio import gather
from random import choice

from http_extended_client import AsyncHttpClient


async def main() -> None:
    base_url = "http://127.0.0.1:8000"
    endpoints = [
        "/get_100",
        "/get_80",
        "/get_50",
        "/get_20",
        "/get_0",
    ]
    request_count = 20

    client = AsyncHttpClient(
        base_url,
        retry_non_success_response=True,
        raise_on_max_attempts=True,
    )

    tasks = [client.get(choice(endpoints)) for _ in range(request_count)]

    await gather(*tasks)


if __name__ == "__main__":
    run(main())

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

http_extended_client-0.1.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

http_extended_client-0.1.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file http_extended_client-0.1.3.tar.gz.

File metadata

  • Download URL: http_extended_client-0.1.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.10 Linux/6.1.0-38-amd64

File hashes

Hashes for http_extended_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 05b12bd36dff0171928ed18922c90064e992c3b03966c9f60a12570b86e8f06d
MD5 78bf044b85744535c9bcd311a6df0a66
BLAKE2b-256 0d97577c24e28aa291059f9aec9d465078d4012e842b581f666adf2c46fc6722

See more details on using hashes here.

File details

Details for the file http_extended_client-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: http_extended_client-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.10 Linux/6.1.0-38-amd64

File hashes

Hashes for http_extended_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 64c39db57434c543ba032de190789baf3e5bb9c9f213c5d4c5b889beb58f1ab8
MD5 17d3375cde72779d98033ddd7175ad1a
BLAKE2b-256 e930887443e507c5335f38ec23318e1cdc23db631868415b8640644aab7599b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page