skillfed

aiosonic

Async HTTP/WebSocket client

aiosonic v1.0.5 750.1K downloads/30d#5,159 on PyPI172
Permissive license MIT Active released

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 aiosonic

uv

uv add aiosonic

poetry

poetry add aiosonic

Installing 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

Development Status :: 5 - Production/StableFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Networking

Tags

asyncio http clientasync websocket clienthttp/2 pythonlightweight http clientconnection pooling asyncioasync http requestswebsocket asyncio
asynciowebsockethttp2

More Python Modules packages