Read GCS and local paths with the same interface, clone of tensorflow.io.gfile
Project description
blobfile
This is a standalone clone of TensorFlow's gfile, supporting both local paths, gs:// paths, and http:// paths.
Writing to a remote path will not actually perform the write incrementally, so don't write to a log file this way. By default reads and writes are streamed, set streaming=False to BlobFile to do a single copy operation per file instead.
The main function is BlobFile, a replacement for GFile. There are also a few additional functions, basename, dirname, and join, which mostly do the same thing as their os.path namesakes, only they also support gs:// paths. There are also a few extra functions:
cache_key- returns a cache key that can be used for the path (this is not guaranteed to change when the content changes, but should hopefully do that)get_url- returns a url for a pathmd5- get the md5 hash for a path, for GCS this is fast, but for other backends this may be slowset_log_callback- set a log callback functionlog(msg: string)to use instead of printing to stdout
A number of existing gfile functions are currently not implemented.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blobfile-0.2.3-py3-none-any.whl.
File metadata
- Download URL: blobfile-0.2.3-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29a7bf591374a60ec1d4380d977666ff47c5e2918723531562c9d489033cd844
|
|
| MD5 |
bf02f24565c1909e81f762a2032c407b
|
|
| BLAKE2b-256 |
b44e58053b4c6068da64e57d95f1fe7b57f97676742944024222747b120ccd38
|