Name Description Size
__init__.py 2077
adapters.py Create an HTTP connection to a unix domain socket :param unix_socket_url: A URL with a scheme of 'http+unix' and the netloc is a percent-encoded path to a unix domain socket. E.g.: 'http+unix://%2Ftmp%2Fprofilesvc.sock/status/pid' 2727
testutils.py Utilities helpful for writing tests Provides a UnixSocketServerThread that creates a running server, listening on a newly created unix socket. Example usage: .. code-block:: python def test_unix_domain_adapter_monkeypatch(): with UnixSocketServerThread() as usock_thread: with requests_unixsocket.monkeypatch('http+unix://'): urlencoded_usock = quote_plus(usock_process.usock) url = 'http+unix://%s/path/to/page' % urlencoded_usock r = requests.get(url) 3093