requests-unixsocket
Use requests to talk HTTP via a UNIX domain socket
Decision gist · record as of 2026-08-14
Yes, if you need to make HTTP requests to services listening on UNIX domain sockets. The package is lightweight, actively maintained, has no known vulnerabilities, and integrates seamlessly with the familiar requests API. The main caveat is that license treatment is unclear in the metadata, so verify the actual license in the repository before use in proprietary code.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- UNIX domain socket support is OS-dependent; abstract namespace sockets are Linux-only.
- Low friction install with a single runtime dependency on requests.
License · maintenance · safety
(unclear)
last release 2025-03-07 (525 days) · last repo commit 2026-07-30 · 221 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,927,288 downloads/mo, #2,822 on PyPI
Alternatives
Verify before relying
import requests_unixsocket
session = requests_unixsocket.Session()
r = session.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
print(r.json())- Whether the package handles connection pooling and performance characteristics for high-volume socket communication
- Support status for Windows named pipes or other non-UNIX socket transports
What it is and what it does
requests-unixsocket is a thin adapter that teaches the requests library to speak HTTP over UNIX domain sockets instead of TCP. It works by registering a custom transport adapter that intercepts http+unix:// URLs and routes them through a local socket connection. The package is primarily used to interact with services that expose APIs only via socket files—most commonly Docker's daemon socket, but also other containerization and system management tools that follow this pattern.
You can use it two ways: by instantiating a special Session object and calling methods on it, or by monkeypatching the requests module globally (or within a context manager) to make standard requests.get() calls work with socket URLs. The package supports both standard UNIX sockets and Linux abstract namespace sockets, and it requires only requests as a runtime dependency.
Use it for
- Query Docker daemon API by connecting to /var/run/docker.sock without spawning a subprocess
- Communicate with systemd user services or other system daemons that expose HTTP APIs via socket files
- Build container orchestration tools that need direct socket-level access to container runtimes
- Test HTTP services running locally that only listen on UNIX sockets in development environments
- Interact with Kubernetes kubelet or other Kubernetes components via their socket endpoints
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to make HTTP requests to services listening on UNIX domain sockets.
The package is lightweight, actively maintained, has no known vulnerabilities, and integrates seamlessly with the familiar requests API. The main caveat is that license treatment is unclear in the metadata, so verify the actual license in the repository before use in proprietary code.
Install
requests-unixsocket on PyPI
Before you install
Low friction install with a single runtime dependency on requests. The package is actively maintained with recent commits and has been stable since its early releases.
Requires Python 3.9 or later. UNIX domain socket support is OS-dependent; abstract namespace sockets are Linux-only.
Quickstart
import requests_unixsocket
session = requests_unixsocket.Session()
r = session.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info')
print(r.json())
Verify before relying
- Whether the package handles connection pooling and performance characteristics for high-volume socket communication
- Support status for Windows named pipes or other non-UNIX socket transports
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagerequests |
| Maintenance | Actively maintained 525 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,927,288 / month, #2,822 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Information TechnologyOperating System :: OS IndependentProgramming Language :: PythonProgramming 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.9Programming Language :: Python :: ImplementationProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: JythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: requests_unixsocket-0.4.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “unix domain socket http client”
- requests-unixsocketExtends the requests library to make HTTP calls over UNIX domain…
- requests-unixsocket2Extends the requests library to make HTTP calls over UNIX domain…
- pytest-socketA pytest plugin that blocks or restricts socket calls during tests,…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also manhole · requests-unixsocket2 · requests-ntlm3 · httpx-socks · requests-ntlm2 · PySocks · requests-mock · pymemcache · pytest-socket