Closed justindujardin closed 4 years ago
Add support for caching files locally from buckets.
Example
from gcspath import GCSPath, use_fs_cache from pathlib import Path use_fs_cache("/tmp/gcs_path_test/") blob = GCSPath("/my-bucket/foo.txt") blob.write_text("hello world!") local_cache: Path = GCSPath.to_local(blob) assert str(local_cache) == "/tmp/gcs_path_test/my-bucket/foo.txt"
Changes
use_fs_cache
GCSPath.to_local
from_bucket
:tada: This PR is included in version 0.0.10 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Add support for caching files locally from buckets.
Example
Changes
use_fs_cache
helper and testsGCSPath.to_local
for downloading and caching blobs (and tests)from_bucket
helper to make it easier to instantiate a GCSPath with just a bucket name