{"id":28308518,"url":"https://github.com/barneygale/httpio","last_synced_at":"2025-07-04T20:33:25.833Z","repository":{"id":44123274,"uuid":"60812778","full_name":"barneygale/httpio","owner":"barneygale","description":"Python library for reading HTTP resources as random-access file-like objects using the `Range` header","archived":false,"fork":false,"pushed_at":"2022-07-29T10:06:40.000Z","size":56,"stargazers_count":32,"open_issues_count":4,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-31T18:49:05.309Z","etag":null,"topics":["client","http","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barneygale.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-09T23:09:51.000Z","updated_at":"2025-05-10T21:38:00.000Z","dependencies_parsed_at":"2022-09-19T01:10:11.549Z","dependency_job_id":null,"html_url":"https://github.com/barneygale/httpio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/barneygale/httpio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barneygale%2Fhttpio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barneygale%2Fhttpio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barneygale%2Fhttpio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barneygale%2Fhttpio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barneygale","download_url":"https://codeload.github.com/barneygale/httpio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barneygale%2Fhttpio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261123877,"owners_count":23113015,"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":["client","http","python"],"created_at":"2025-05-24T08:08:22.703Z","updated_at":"2025-07-04T20:33:25.800Z","avatar_url":"https://github.com/barneygale.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"httpio\n======\n\nHTTP resources as random-access file-like objects\n\nhttpio is a small Python library that allows you to access files\nserved over HTTP as file-like_ objects (which is to say that they\nsupport the interface of the standard library's BufferedIOBase_\nclass). It differs from libraries like ``urllib`` and ``requests`` in\nthat it supports ``seek()`` (which moves an internal pointer), and\nthat ``read()`` makes a request with the ``Range`` header set. It also\nsupports caching of contents using a configurable block size, and will\nreuse TCP connections where possible.\n\nInstallation\n------------\n\nUse ``pip`` to install httpio:\n\n.. code-block:: console\n\n    $ pip install httpio\n\nUsage\n-----\n\n.. code-block:: python\n\n    import zipfile\n    import httpio\n\n    url = \"http://some/large/file.zip\"\n    with httpio.open(url) as fp:\n        zf = zipfile.ZipFile(fp)\n        print(zf.namelist())\n\n.. _file-like: https://docs.python.org/3/glossary.html#term-file-object\n\n.. _BufferedIOBase: https://docs.python.org/3/library/io.html#io.BufferedIOBase\n\nUnit Tests\n----------\n\nUnit tests are provided for the standard behaviours implemented by\nthe library. They can be run with\n\n.. code-block:: console\n    \n    $ python -m unittest discover -s tests\n\nor a ``tox.ini`` file is provided which allows the tests to be run in\nvirtual environments using the ``tox`` tool:\n\n.. code-block:: console\n    \n    $ tox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarneygale%2Fhttpio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarneygale%2Fhttpio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarneygale%2Fhttpio/lists"}