Skip to main content

Minimal asyncio-based HTTP/1.1 client

Project description

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

tiny_aio_http_client-1.0.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file tiny_aio_http_client-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tiny_aio_http_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d57416174009e337bc0179be67cdccc608dcbd0ec9cd2f72c85d61b52169aa0
MD5 9543f7127bdc7cba140660a7dca9c5ab
BLAKE2b-256 a7107de7cca54ee93019a5e4fa3d243dacddc3600600ea0b564709685e8557ce

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