Type-safe, Path-like S3 utilities built on top of boto3.
Project description
ezS3
This library provides abstractions over boto3 to easily deal with S3 buckets.
Usage
from ezs3 import S3
# be sure to have set AWS_ACCESS_KEY_ID and
# AWS_SECRET_ACCESS_KEY env variables.
s3 = S3(bucket_name="some_bucket")
# or load credentials from file.
s3 = S3.from_credentials(bucket_name="some_bucket")
# upload everything in `./data` to `bucket_name://data/input`, imitating the
# directory structure. the directory `data` itself is not copied.
# these are equivalent:
# s3.upload("./data", "data/input")
# s3.upload("./data/", "data/input/")
s3.upload("./data/", "data/input")
# upload `/tmp/my_file` to `bucket_name://data/my_file`.
s3.upload("/tmp/my_file", "data/")
# download everything under `bucket_name://data/input` into `./data2`,
# imitating the prefix structure.
s3.download("data/input", "./data2/")
# download `bucket_name://data/my_file` into `/tmp`.
s3.download("data/my_file", "/tmp/")
# same as above, but file is renamed to `my_file2`.
s3.download("data/my_file", "/tmp/my_file2")
# remove files.
s3.remove(*s3.list_keys("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
ezs3-1.0.0.tar.gz
(131.6 kB
view details)
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
ezs3-1.0.0-py3-none-any.whl
(11.9 kB
view details)
File details
Details for the file ezs3-1.0.0.tar.gz.
File metadata
- Download URL: ezs3-1.0.0.tar.gz
- Upload date:
- Size: 131.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f74bf91333ccd6ab81b10018170dc52d0a03b59d2475c928af4abdf92915ffc
|
|
| MD5 |
264f5fa718a37acf88de2e0b2ef14de0
|
|
| BLAKE2b-256 |
c94ab14d72e34fedd9c9a0033f363c98a8b054e8155593396d71effcc6f63fbb
|
File details
Details for the file ezs3-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ezs3-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9211962447f633de866f9ecaf6737c159cd760ecffe85ac732762dfcf1114cb
|
|
| MD5 |
46866a42c3b89ecf5b7df192d3636348
|
|
| BLAKE2b-256 |
c1ff296f34b3eef1129754b96500d8d0c7266d3b9e55513271a9ddd2f5b302b7
|