--- id: requests-unixsocket2 version: "1.0.1" license: ISC license_treatment: permissive maintenance: aging --- # requests-unixsocket2 — Use requests to talk HTTP via a UNIX domain socket License: permissive · Maintenance: aging · Downloads: 513.4K/mo ## What it is and what it does requests-unixsocket2 is a thin adapter that teaches the requests HTTP library to communicate over UNIX domain sockets instead of TCP connections. This is useful for talking to services that listen on local sockets—like the Docker daemon on /var/run/docker.sock—without needing a separate HTTP client library or lower-level socket code. You can use it two ways: instantiate a special Session object and call methods on it, or monkeypatch the requests module globally (or temporarily via context manager) to make standard requests.get() and similar calls work with socket URLs. It supports both regular UNIX sockets and Linux abstract namespace sockets (prefixed with a NULL byte). The package depends only on requests and urllib3, so installation is straightforward. Use it for: - Query the Docker daemon API by connecting to /var/run/docker.sock without spawning a subprocess - Communicate with system services that expose HTTP-like APIs over UNIX sockets - Build tools that interact with local socket-based services while reusing existing requests-based code - Test HTTP clients against mock services listening on abstract namespace sockets in CI/CD pipelines - Avoid network overhead and port conflicts by using UNIX sockets for inter-process HTTP communication ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extends the requests library to make HTTP calls over UNIX domain sockets instead of TCP, supporting both explicit session objects and monkeypatching for minimal code changes. Yes, if you need to make HTTP requests to services listening on UNIX domain sockets (Docker, systemd, etc.) and want to reuse the familiar requests API. The low install friction and permissive license make it a straightforward choice. The aging maintenance status is not a blocker for this narrow, stable use case, but verify that the fork's divergence from the original project meets your needs. ## Install pip install requests-unixsocket2 uv add requests-unixsocket2 poetry add requests-unixsocket2 ## Installing requests-unixsocket2 Before you install: Low friction installation with only requests and urllib3 as runtime dependencies. Marked as aging (345 days since last release), so maintenance activity is limited but the package remains functional for its narrow use case. License in practice: ISC license is permissive and imposes minimal restrictions; you can use, modify, and distribute this package freely in commercial and private projects. Quickstart: pip install requests-unixsocket2 import requests_unixsocket session = requests_unixsocket.Session() r = session.get('http+unix://%2Fvar%2Frun%2Fdocker.sock/info') print(r.status_code) Requires Python >=3.9 Verify before relying: - Whether abstract namespace socket support (Linux-only feature) works reliably across different kernel versions - Current state of the upstream origin project and how this fork diverges from it ## Package facts - License: ISC (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 513.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags http over unix socket, requests unix domain socket, unix socket http client, docker socket communication, local socket http requests, abstract namespace socket, unix socket adapter requests, unix-socket, docker-client, system-integration [View on SkillFed](https://skillfed.io/packages/requests-unixsocket2) · [View on PyPI](https://pypi.org/project/requests-unixsocket2/)