{"id":18338926,"url":"https://github.com/marverix/httpunixsocketconnection","last_synced_at":"2025-06-23T01:06:18.385Z","repository":{"id":57437687,"uuid":"477048145","full_name":"marverix/HTTPUnixSocketConnection","owner":"marverix","description":"Really small Python class that extends native http.client.HTTPConnection allowing sending HTTP requests to Unix Sockets","archived":false,"fork":false,"pushed_at":"2022-04-02T13:49:05.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T01:05:57.092Z","etag":null,"topics":["linux","python3","python3-library","socket","sockets","unix","unix-domain-socket","unix-domain-sockets"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marverix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-02T12:29:06.000Z","updated_at":"2022-04-02T13:48:33.000Z","dependencies_parsed_at":"2022-09-19T01:00:25.915Z","dependency_job_id":null,"html_url":"https://github.com/marverix/HTTPUnixSocketConnection","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/marverix/HTTPUnixSocketConnection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marverix%2FHTTPUnixSocketConnection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marverix%2FHTTPUnixSocketConnection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marverix%2FHTTPUnixSocketConnection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marverix%2FHTTPUnixSocketConnection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marverix","download_url":"https://codeload.github.com/marverix/HTTPUnixSocketConnection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marverix%2FHTTPUnixSocketConnection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261392180,"owners_count":23151718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","python3","python3-library","socket","sockets","unix","unix-domain-socket","unix-domain-sockets"],"created_at":"2024-11-05T20:15:56.978Z","updated_at":"2025-06-23T01:06:13.369Z","avatar_url":"https://github.com/marverix.png","language":"Python","readme":"# HTTPUnixSocketConnection\n\nReally small Python class that extends native http.client.HTTPConnection allowing sending HTTP requests to Unix Sockets\n\n## Installation\n\n### Poetry\n\n```sh\npoetry add httpunixsocketconnection\n```\n\n### pip\n\n```sh\npip install httpunixsocketconnection\n```\n\n## Usage\n\nBecause the class base is `http.client.HTTPConnection`, the API is almost the same.\nOnly the constructor and `connect` method is different.\nWith the rest please follow [the official docs](https://docs.python.org/3.8/library/http.client.html#http.client.HTTPConnection).\n\n```python\nfrom httpunixsocketconnection import HTTPUnixSocketConnection\n\n# Create a connection\nconn = HTTPUnixSocketConnection(\n    unix_socket=\"/var/run/some.unix.socket\"\n    # timeout=Like in HTTPConnection\n    # blocksize=Like in HTTPConnection\n)\n```\n\n### Example: Getting list of Docker Containers\n\n```python\nfrom httpunixsocketconnection import HTTPUnixSocketConnection\n\nconn = HTTPUnixSocketConnection(\"/var/run/docker.sock\")\nconn.request(\"GET\", \"/containers/json\")\n\nres = conn.getresponse()\nprint(res.status, res.reason)\n\ncontent = res.read().decode(\"utf-8\")\nprint(content)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarverix%2Fhttpunixsocketconnection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarverix%2Fhttpunixsocketconnection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarverix%2Fhttpunixsocketconnection/lists"}