Skip to main content

HTTP resources as random-access file-like objects

Project description

HTTP resources as random-access file-like objects

httpio is a small Python library that allows you to access files served over HTTP as file-like objects. It differs from libraries like urllib and requests in that it supports seek() (which moves an internal pointer), and that read() makes a request with the Range header set. It also supports caching of contents using a configurable block size, and will reuse TCP connections where possible.

Installation

Use pip to install httpio:

$ pip install httpio

Usage

import zipfile
import httpio

url = "http://some/large/file.zip"
with httpio.open(url) as fp:
    zf = zipfile.ZipFile(fp)
    print(zf.namelist())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

httpio-0.1.2.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file httpio-0.1.2.tar.gz.

File metadata

  • Download URL: httpio-0.1.2.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for httpio-0.1.2.tar.gz
Algorithm Hash digest
SHA256 677aaaaa58d9c7624a13770962a57317741557cc89636187d47ced5ebe5ab8e5
MD5 1fbd2b933c72b584db96904653f89803
BLAKE2b-256 575806b5e84f3b404083d8ac28a85062b3da8e4863af1524a17b4555ecea2bc1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page