Registry / http-networking / asysocks

asysocks

JSON →
library0.2.18pypypiunverified

Asynchronous SOCKS4/5, HTTP proxy and SSH tunnel client library for Python, built on the asyncio framework. Current version 0.2.18, with irregular releases focusing on bug fixes and minor feature additions.

pip install asysocks
INSTALL
IMPORT
SIG · ASYSOCKS
A
asysocks
http-networkingpythonv0.2.18
Install
2.7s avg
Import
Disk
36MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.18 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 37.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.000s · 38MB
36MB installed
● package 36MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SocksClient
from asysocks import SocksClient
from asysocks.client import SocksClient

Connect to example.com via a SOCKS5 proxy at localhost:1080 and send an HTTP request.

import asyncio from asysocks.client import SocksClient async def main(): client = SocksClient( target=('example.com', 80), proxy=('127.0.0.1', 1080), proxy_type='socks5' ) await client.connect() await client.send(b'GET / HTTP/1.0\r\n\r\n') response = await client.recv() print(response) await client.close() asyncio.run(main())
Debug
Known issues
gotchaThe library uses asyncio, not threading. Do not call connect/send/recv from different threads without proper synchronization.
fix
Use asyncio.run_coroutine_threadsafe or run all calls in the same event loop.
affects: 0.1.0+
deprecatedOld import path 'asysocks.SocksClient' is removed in 0.2.0+. Use 'from asysocks.client import SocksClient'.
fix
Update import to from asysocks.client import SocksClient.
affects: >=0.2.0
breakingIn version 0.2.0, the API was rewritten. The previous synchronous client no longer exists. All methods return coroutines.
fix
Use async/await patterns. Refer to the quickstart example.
affects: 0.2.0
Upgrade
Version history
0.2.18latest on PyPI · released Oct 29, 2025
Audit
Dependencies
asynciorequiredRuntime core dependency (stdlib)
aiosqliteoptionalOptional dependency for SOCKS proxy authentication cache
Agent activity
40 hits · last 30 days
node
36
OpenAI (training)
1
Resources
asysocks — pip install asysocks · libregistry