🗂️ Cloudpath
Optimized pathlib backend for Google Cloud.
A filesystem abstraction similar to pathlib that is extensible to new
filesystems. Comes with support for local filesystems and GCS buckets.
path = cloudpath.Path('gs://bucket/path/to/file.txt')
# String operations
path.parent # gs://bucket/path/to
path.name # file.txt
path.stem # file
path.suffix # .txt
# File operations
path.read(mode='r') # Content of the file as string
path.read(mode='rb') # Content of the file as bytes
path.write(content, mode='w') # Write string to the file
path.write(content, mode='wb') # Write bytes to the file
with path.open(mode='r') as f: # Create a file pointer
pass
# File system checks
path.parent.glob('*') # Get all sibling paths
path.exists() # True
path.isdir() # False
path.isfile() # True
# File system changes
(path.parent / 'foo').mkdir() # Creates directory including parents
path.remove() # Deletes a file or empty directory
path.parent.rmtree() # Deletes directory and its content
path.copy(path.parent / 'copy.txt') # Makes a copy
path.move(path.parent / 'moved.txt') # Moves the file
Metadata
Release files for cloudpath 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cloudpath-0.2.0.tar.gz | 6.8 kB | Without provenance | Details for cloudpath-0.2.0.tar.gz |
Release files / cloudpath-0.2.0.tar.gz
| Download URL | cloudpath-0.2.0.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
010420d93f5114900090193f5a27efed910d80f349308f9a3836cd25d061ffca
|
|
BLAKE2b-256 checksum How to use checksums |
9e45cade7673a8b24235697be6ed73f18c2c966eea815b2688f1036b74fdd734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|
Security for cloudpath 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.