Skip to main content

Simple asynchronous HTTP client with retry, timeout, and SSL options

Project description

QuickAPI Async

QuickAPI Async is an asynchronous HTTP client for Python that supports GET and POST requests with retry, timeout, and optional SSL verification bypass.


Features

  • Asynchronous GET and POST requests using aiohttp
  • Configurable timeout for requests
  • Automatic retries on failure
  • Optional SSL verification bypass (ignore_ssl=True) for development or self-signed certificates
  • Optional progress bar for request execution (show_progress=True)

Installation

pip install quickapi_async

Optional Parameters

  • .timeout(seconds) – set request timeout (default: 5)
  • .retry(n) – number of retries if request fails (default: 0)
  • .auth(token) – add Bearer token authentication
  • .headers(dict) – add custom HTTP headers
  • .data(dict) – provide JSON data for POST requests
  • .json(ignore_ssl=True/False, show_progress=True/False) – send the request and return a response object with:
    • .status → HTTP status code (int)
    • .data → parsed JSON response as dict, or None if the response is not JSON
  • ignore_ssl=True disables SSL verification; only use for testing or self-signed certificates
  • show_progress=True shows a horizontal progress bar that covers all retry attempts
Example Usage
**GET Request**

import asyncio
from quickapi_async import QuickAPIAsync

async def main():
    client = QuickAPIAsync()

    response = await (
        client.get("https://jsonplaceholder.typicode.com/todos/1")
              .timeout(10)
              .retry(2)
              .json(ignore_ssl=False, show_progress=True)
    )

    print("Status:", response.status)
    print("Data:", response.data)

asyncio.run(main())

----------
This GET request will try up to 3 times (1 initial + 2 retries) if it fails.
The progress bar will remain on screen after the request completes.
----------
**POST Request with JSON and Authorization**

import asyncio
from quickapi_async import QuickAPIAsync

async def main():
    client = QuickAPIAsync()

    response = await (
        client.post("https://jsonplaceholder.typicode.com/posts")
              .timeout(10)
              .retry(2)
              .auth("your_bearer_token_here")
              .headers({"Custom-Header": "Value"})
              .data({
                  "title": "foo",
                  "body": "bar",
                  "userId": 1
              })
              .json(ignore_ssl=False, show_progress=True)
    )

    print("Status:", response.status)
    print("Data:", response.data)

asyncio.run(main())

----------
This POST request sends JSON data with custom headers and Bearer token authorization.
The progress bar shows the request progress across all retry attempts.
.data() provides the JSON payload for the POST request.
----------

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

quickapi_async-1.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

quickapi_async-1.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file quickapi_async-1.1.0.tar.gz.

File metadata

  • Download URL: quickapi_async-1.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for quickapi_async-1.1.0.tar.gz
Algorithm Hash digest
SHA256 72db3d6981e314f00456c321c7b655bb7ea3c5ae3f2726a26cd062f9581ebe8e
MD5 5c343f8773f49b20f8dca239dbe66aeb
BLAKE2b-256 b4c8e9ad0f26d63e22c55724125210917f80dc9d19e0dc987ee3ae6a549ec7df

See more details on using hashes here.

File details

Details for the file quickapi_async-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: quickapi_async-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for quickapi_async-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a76238105c717b5636238ffface1848aed99ed8e4445df7704063c4256deffe
MD5 d8b767b3a42afa0ad6223b24c6e395c5
BLAKE2b-256 682e3d2aa70a043ec4d99d62aae88c157d7347f2b49dbc25b4caba54351df7d8

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