{"id":20909,"library":"aiosocks","title":"aiosocks","description":"SOCKS proxy client for asyncio and aiohttp. Current version 0.2.6, last released in 2018. Library is in maintenance mode with very rare updates.","status":"maintenance","version":"0.2.6","language":"python","source_language":"en","source_url":"https://github.com/nibrag/aiosocks","tags":["socks","proxy","asyncio","aiohttp"],"install":[{"cmd":"pip install aiosocks","lang":"bash","label":"pip"}],"dependencies":[],"imports":[{"note":"Direct import from aiosocks submodule.","symbol":"SocksConnector","correct":"from aiosocks.connector import SocksConnector"},{"note":"Symbol is not exposed in package __init__.py in recent versions.","wrong":"from aiosocks import ProxyClientRequest","symbol":"ProxyClientRequest","correct":"from aiosocks.connector import ProxyClientRequest"},{"note":"Auth classes are exported at package level.","wrong":"from aiosocks.connector import SOCKS5Auth","symbol":"SOCKS5Auth","correct":"from aiosocks import SOCKS5Auth"}],"quickstart":{"code":"import asyncio\nimport aiohttp\nfrom aiosocks.connector import SocksConnector, ProxyClientRequest\n\nasync def fetch():\n    connector = SocksConnector.from_url('socks5://user:pass@127.0.0.1:1080', remote_resolve=True)\n    async with aiohttp.ClientSession(connector=connector, request_class=ProxyClientRequest) as session:\n        async with session.get('http://example.com') as resp:\n            print(await resp.text())\n\nloop = asyncio.get_event_loop()\nloop.run_until_complete(fetch())","lang":"python","description":"Make a SOCKS5 request with authentication."},"warnings":[{"fix":"Manually read SOCKS_PROXY environment variable.","message":"proxy_from_env was removed in v0.2.5. Use environment variable parsing manually.","severity":"deprecated","affected_versions":">=0.2.5"},{"fix":"Upgrade aiohttp to >=2.3.2.","message":"aiohttp < 2.3.2 is no longer supported as of v0.2.5","severity":"breaking","affected_versions":">=0.2.5"},{"fix":"Use SOCKS4a or switch to another library for SOCKS4.","message":"SocksConnector does not support SOCKS4; only SOCKS5 and SOCKS4a.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install aiosocks","cause":"Library not installed or Python version too old (dropped Python 3.4 in v0.2.1).","error":"No module named 'aiosocks'"},{"fix":"from aiosocks.connector import SocksConnector","cause":"Import path incorrect; 'connector' is a submodule.","error":"AttributeError: module 'aiosocks' has no attribute 'connector'"},{"fix":"Use aiohttp >=2.3.2 and <4.0.0.","cause":"aiohttp version mismatch; ProxyClientRequest is for aiohttp 2.x.","error":"TypeError: __init__() got an unexpected keyword argument 'request_class'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}