Skip to main content

Improvement for the `urlopen` function.

Project description

urlopen2

Description

Improvement for the urlopen function.request.

Install

pip install urlopen2

Using

from urlopen2 import URLFile

with URLFile("https://example.com/file.bin") as f:
    f.read(128)
    # In this case, 128 bytes of the file will be loaded.
    f.seek(0)
    # Move the caret to the beginning of the file
    data = f.read(128) 
    # Since we are taking the same 128 bytes that have already been loaded, they will be received from the buffer.

print(data)

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

urlopen2-1.0.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

urlopen2-1.0.1-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

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