s3utils
This module defines common utilities for managing S3 buckets.
init(self, region_name, aws_access_key_id, aws_secret_access_key, download_file_extension_filter=[], upload_file_extension_filter=[])
@description
Initializes the S3Client object and creates a S3 client object.
@arguments
region_name : <str> Supplies the region name of the S3 instance.
aws_access_key_id : <str> Supplies the AWS access key id.
aws_secret_access_key : <str> Supplies the AWS secret access key.
download_file_extension_filter : <list> [optional, default=[]] Supplies the file extensions
to download. If set to [], all files will be downloaded.
upload_file_extension_filter : <list> [optional, default=[]] Supplies the file extensions
to upload. If set to [], all files will be uploaded.
s3_list_folder(self, bucket, s3_folder=None)
@description
Lists all files and sub-folders of the given folder.
@arguments
bucket : <str> Supplies the bucket name.
s3_folder : <str> [optional, default=None] Supplies the folder name to list under.
If set to None, the top-level content under the given bucket will be listed.
@returns
<list>, <list>: Returns a list contains the name of the files under the given
folder, and a list contains the name of the sub-folders under the given folder.
s3_upload_file(self, bucket, local_file_location, s3_folder=None)
@description
Upload a file to the given folder under the given S3 bucket.
@arguments
bucket : <str> Supplies the bucket name.
local_file_location : <str> Supplies the location of the file to upload.
s3_folder : <str> [optional, default=None] Supplies the folder name to upload to.
If set to None, the file will be uploaded under the bucket.
@returns
None.
s3_upload_folder(self, bucket, s3_base_folder, local_folder_location)
@description
Upload a folder to the given folder under the given S3 bucket.
@arguments
bucket : <str> Supplies the bucket name.
s3_base_folder : <str> Supplies the base folder on S3 to upload to.
local_folder_location : <str> Supplies the location of the folder to upload.
@returns
None.
s3_download_file(self, bucket, s3_file_name, download_to_folder_location)
@description
Download the file from S3 to the given location.
@arguments
bucket : <str> Supplies the bucket name.
s3_file_name : <str> Supplies the name of the file on S3 to download.
download_to_folder_location : <str> Supplies the folder to download to.
@returns
None.
s3_download_folder(self, bucket, s3_folder, download_to_folder_location)
@description
Download the files in the given folder from S3 to the given location.
@arguments
bucket : <str> Supplies the bucket name.
s3_folder : <str> Supplies the name of the folder on S3 to download.
download_to_folder_location : <str> Supplies the folder to download to.
@returns
None.
s3_delete_by_key(self, bucket, s3_folder=None, key=None)
@description
Delete all files from the given bucket starting at the given folder that
match the given key.
@arguments
bucket : <str> Supplies the bucket name.
s3_folder : <str> [optional, default=None] Supplies the name of the folder
on S3 to start deleting. If set to None, deletion will start at the bucket.
key : <str> [optional, default=None] Supplies the key to delete. If set to
None, all files will be deleted.
@returns
None.
Metadata
Release files for ddls3utils 0.0.7
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 | |
|---|---|---|---|---|
| ddls3utils-0.0.7.tar.gz | 3.2 kB | Without provenance | Details |
Release files / ddls3utils-0.0.7.tar.gz
| Download URL | ddls3utils-0.0.7.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3a014520ddfc9b54e9c1a7d77435efa539b85d6fe7f5962867b98c44c7505a6
|
|
BLAKE2b-256 checksum How to use checksums |
25ad795d006746b2ecadc3f0c2efd6f1ee7a9190b4e42478931f80a743697cb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.0
|
Security for ddls3utils 0.0.7
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.