Skip to content

sjmillius/urlfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

urlfile

Lazily reading a file from a url. Allows random access via http range requests so that not the whole file has to be downloaded first.

Example Usage

import urlfile
import zipfile

with zipfile.ZipFile(urlfile.UrlFile(url=...)) as f:
  f.printdir()

Caching

Buffering and caching is provided via urlfile.BufferedUrlFile.

f = urlfile.BufferedUrlFile(url=..., cache_size_bytes=...)

By default, uses a cache size of 10MB.

Other options

These are arguments of UrlFile/BufferedUrlFile

  • verbose: whether to show progress bars during fetching of data (using rich.progress, default: False)
  • session: a requests.Session to use (default: None, creates a new session)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages