aiosonic
Async HTTP/WebSocket client
What it is and what it does
aiosonic is an asyncio-based HTTP and WebSocket client designed for high-performance, low-overhead network communication. It supports HTTP/1.1, HTTP/2 (over HTTPS), and WebSocket protocols, with built-in features like connection pooling, keepalive, automatic decompression, redirect following, and cookie persistence. The library is fully type-annotated and includes multipart file upload support, chunked request/response handling, and per-request timeout configuration.
The package is intended for developers building async Python applications that need efficient HTTP communication without the overhead of heavier frameworks. It can be used directly via HTTPClient for simple requests or extended via BaseClient for wrapping APIs. With three minimal runtime dependencies and a pure Python wheel, it installs with low friction and integrates cleanly into modern asyncio codebases.
Use it for:
- Building async web scrapers or API clients that need fast, concurrent HTTP requests with connection reuse.
- Creating WebSocket-based real-time applications requiring bidirectional communication over asyncio.
- Wrapping third-party REST APIs (e.g., GitHub, custom services) with custom response handling via BaseClient.
- Handling large file uploads via multipart forms in async workflows without blocking.
- Implementing HTTP/2 clients for services that require or benefit from multiplexed connections over TLS.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An asyncio HTTP/1.1, HTTP/2, and WebSocket client library with connection pooling, keepalive support, and automatic redirect handling.
Yes. aiosonic is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and installs with low friction. It is well-suited for asyncio applications requiring HTTP or WebSocket communication. Install it if you need a lightweight, type-annotated async HTTP client with HTTP/2 and WebSocket support; skip it if you are not using asyncio or prefer a synchronous HTTP library.
Install
aiosonic on PyPI
pip
pip install aiosonicuv
uv add aiosonicpoetry
poetry add aiosonicInstalling aiosonic
Before you install
Low friction: pure Python wheel with only three runtime dependencies (charset-normalizer, h2, onecache). Actively maintained with a release 3 days ago and last commit on 2026-08-11.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
import asyncio
import aiosonic
async def main():
client = aiosonic.HTTPClient()
response = await client.get('https://www.google.com/')
print(response.status_code)
asyncio.run(main())
Requires Python >= 3.10 or PyPy 3.11+; designed for asyncio-based applications only.
Verify before relying
- Performance comparison methodology and conditions for the benchmark results shown in the description.
- Whether HTTP/2 server push silence (ignoring push promise frames) affects real-world use cases.
- Cookie persistence behavior and session management details beyond what the description states.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — charset-normalizer, h2, onecache |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 750,111/month — #5,159 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiosonic-1.0.5-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
aresponsesMocks external HTTP/HTTPS services for…
permissive · top 15,000 on PyPI
aioapnsaioapns sends push notifications to iOS devices…
permissive · top 5,000 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
geventhttpclientA concurrent HTTP client for gevent that…
permissive · top 5,000 on PyPI
httpx-wsAdds WebSocket support to HTTPX, enabling sync…
permissive · top 5,000 on PyPI
httpx2HTTPX2 is a fully featured HTTP client library…
permissive · top 1,000 on PyPI
uvicornUvicorn is an ASGI web server that runs async…
permissive · top 100 on PyPI
agentmailAgentmail provides a Python client library for…
unclear · top 5,000 on PyPI
aioresponsesMocks HTTP requests made by aiohttp's…
permissive · top 5,000 on PyPI
aioambientAn async Python library for querying Ambient…
permissive · top 15,000 on PyPI