Skip to main content

tiny-aio-http-client

Minimal asyncio-based HTTP/1.1 client for Python 3.8+ with no external dependencies.

Features

  • GET, POST, PUT, PATCH, DELETE, HEAD methods
  • Automatic redirect following
  • Cookie jar with domain/path/secure matching
  • Chunked transfer encoding support
  • JSON request body encoding
  • Query parameter merging
  • HTTP and HTTPS proxy support (including CONNECT tunneling)
  • Proxy resolution from environment variables (HTTP_PROXY, HTTPS_PROXY, ALL_PROXY) and Windows registry
  • SSL verification toggle
  • Per-request and per-client timeouts

Usage

High-level interface: fetch and fetch_chunked

import asyncio
from tiny_aio_http_client import fetch, fetch_chunked

async def main() -> None:
	print(await fetch("https://example.com"))

	with open("index.html", "w") as fp:
		async for chunk in fetch_chunked("https://example.com"):
			fp.write(chunk)

asyncio.run(main())

Low-level interface: HtppClient

import asyncio
from tiny_aio_http_client import HttpClient

async def main() -> None:
    async with HttpClient() as client:
        async with await client.get("https://example.com") as response:
            body = await response.read()
            print(body)

asyncio.run(main())

See the module docstring in tiny_aio_http_client/__init__.py for additional examples.

License

MIT

Release files for tiny-aio-http-client 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tiny-aio-http-client 1.0.2
File Interpreter ABI Platform
tiny_aio_http_client-1.0.2-py3-none-any.whl Python 3 none any Details

Release files / tiny_aio_http_client-1.0.2-py3-none-any.whl

Download URL tiny_aio_http_client-1.0.2-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c682e5fc3b20ab8b9a51a81674b97f64749479533a229a7aa8cbe6eb886b29bd
BLAKE2b-256 checksum
How to use checksums
09cbbb131f1751873bb7578d1990e4be449bc036de6b6e54d9d6e987fb0ce829
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page