seekablehttpfile


Nameseekablehttpfile JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/thatch/seekablehttpfile/
SummaryA lazy-loading, seekable, remote file object using http range requests
upload_time2024-01-31 19:09:11
maintainer
docs_urlNone
authorTim Hatch
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # seekablehttpfile

This project provides a file-like object that fetches parts of a file using HTTP
range requests as needed.

```pycon
>>> from seekablehttpfile import SeekableHttpFile
>>> from zipfile import ZipFile

>>> f = SeekableHttpFile("https://files.pythonhosted.org/packages/cb/90/599c79a248dcae6935331113649de5d75427e320efde21b583648b498584/tensorflow_intel-2.14.0-cp310-cp310-win_amd64.whl")  # 284MB
>>> # use as normal, for example with ZipFile
>>> z = ZipFile(f)
>>> len(z.namelist())
9414
>>> # find out how much we actually read
>>> f.stats
{'num_requests': 4, 'optimistic_bytes_read': 256000, 'lazy_bytes_read': 1078669, 'satisfied_from_cache': 2}

```

# Version Compatibility

Users of this library should be able to use Python 3.7 or above.  This is
validated by tests, and is the version encoded in `Requires-Python`.

Development requires Python 3.12 (or 3.13), realistically.  CI validates that it
works on 3.10 and above, but you will get less checking in flake8.  Expect older
versions to be dropped as soon as there is a version of mypy, black, etc that is
not simultaneously compatible with all development versions.

Notably, this means that while this project might function (and pass tests) on
Python 3.7, it's likely that you can't typecheck against it.

# License

seekablehttpfile is copyright [Tim Hatch](https://timhatch.com/), and licensed under
the MIT license.  I am providing code in this repository to you under an open
source license.  This is my personal repository; the license you receive to
my code is from me and not from my employer. See the `LICENSE` file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thatch/seekablehttpfile/",
    "name": "seekablehttpfile",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Tim Hatch",
    "author_email": "tim@timhatch.com",
    "download_url": "https://files.pythonhosted.org/packages/33/aa/eb533142a47d18ab5a6e1c430337b476bd11adfae221da96bc757fcb7079/seekablehttpfile-0.1.0.tar.gz",
    "platform": null,
    "description": "# seekablehttpfile\n\nThis project provides a file-like object that fetches parts of a file using HTTP\nrange requests as needed.\n\n```pycon\n>>> from seekablehttpfile import SeekableHttpFile\n>>> from zipfile import ZipFile\n\n>>> f = SeekableHttpFile(\"https://files.pythonhosted.org/packages/cb/90/599c79a248dcae6935331113649de5d75427e320efde21b583648b498584/tensorflow_intel-2.14.0-cp310-cp310-win_amd64.whl\")  # 284MB\n>>> # use as normal, for example with ZipFile\n>>> z = ZipFile(f)\n>>> len(z.namelist())\n9414\n>>> # find out how much we actually read\n>>> f.stats\n{'num_requests': 4, 'optimistic_bytes_read': 256000, 'lazy_bytes_read': 1078669, 'satisfied_from_cache': 2}\n\n```\n\n# Version Compatibility\n\nUsers of this library should be able to use Python 3.7 or above.  This is\nvalidated by tests, and is the version encoded in `Requires-Python`.\n\nDevelopment requires Python 3.12 (or 3.13), realistically.  CI validates that it\nworks on 3.10 and above, but you will get less checking in flake8.  Expect older\nversions to be dropped as soon as there is a version of mypy, black, etc that is\nnot simultaneously compatible with all development versions.\n\nNotably, this means that while this project might function (and pass tests) on\nPython 3.7, it's likely that you can't typecheck against it.\n\n# License\n\nseekablehttpfile is copyright [Tim Hatch](https://timhatch.com/), and licensed under\nthe MIT license.  I am providing code in this repository to you under an open\nsource license.  This is my personal repository; the license you receive to\nmy code is from me and not from my employer. See the `LICENSE` file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A lazy-loading, seekable, remote file object using http range requests",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/thatch/seekablehttpfile/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e4ae9884a2ba7892f64b5768e552fcc31f140fdfa2bd63f9a044f26b5514a57",
                "md5": "aa20e62409bff828608314871d41b236",
                "sha256": "4225719c04e4fd509d2611dad0800b42dee13dc1c844a37dc2a055f4fec3ffbf"
            },
            "downloads": -1,
            "filename": "seekablehttpfile-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aa20e62409bff828608314871d41b236",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10051,
            "upload_time": "2024-01-31T19:09:10",
            "upload_time_iso_8601": "2024-01-31T19:09:10.234718Z",
            "url": "https://files.pythonhosted.org/packages/0e/4a/e9884a2ba7892f64b5768e552fcc31f140fdfa2bd63f9a044f26b5514a57/seekablehttpfile-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33aaeb533142a47d18ab5a6e1c430337b476bd11adfae221da96bc757fcb7079",
                "md5": "bbafd54a96a3ed0d1121c7f059caf36e",
                "sha256": "4874c6cb0d32c4c5654ecde9fe7f8056370329b6f38bea2d4eb8062cf4411f8e"
            },
            "downloads": -1,
            "filename": "seekablehttpfile-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bbafd54a96a3ed0d1121c7f059caf36e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 11294,
            "upload_time": "2024-01-31T19:09:11",
            "upload_time_iso_8601": "2024-01-31T19:09:11.516878Z",
            "url": "https://files.pythonhosted.org/packages/33/aa/eb533142a47d18ab5a6e1c430337b476bd11adfae221da96bc757fcb7079/seekablehttpfile-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-31 19:09:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thatch",
    "github_project": "seekablehttpfile",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "seekablehttpfile"
}
        
Elapsed time: 2.10212s