Utility modules for the s3 upload and download tasks.
Project description
s3_upload_download with dirictory position
Utilities for s3 download and upload file.
Function for s3 download to the local path including s3 sub folder path
from s3_upload_download import s3_transfers_utlits
s3_transfers_utlits.download_s3_file(bucket_name, s3_folder,file_extension, destination_path)
Parameters:
bucket_name: The name of the s3 bucket
s3_folder: The folder path in the s3 bucket including subfolders
file_extension: extension of file such as .parquet or .csv
destination_path: a relative or absolute directory path in the local file system
Example Usage .. code-block:: python
from s3_upload_download import s3_transfers_file
bucket_name='test_bucket'
s3_folder='test_folder'
file_extension='.parquet'
destination_path=f'home/momataj/test_folder/'
s3_transfers_file.download_s3_file(bucket_name, s3_folder, file_extension, destination_path)
Function for s3 upload from the local path including s3 sub folder path and file extension
from s3_upload_download import s3_transfers_utlits
s3_transfers_utlits.upload_s3_file(bucket_name,source_path,base_dir,file_extension)
Parameters:
bucket_name: the name of the s3 bucket
source_path: local dirctory where file is located such as /home/{username}/{foldername}
base_dir: a relative or absolute directory path in the local file system such as /home/{username}/
file_extension: extension of file such as .parquet or .csv
Example Usage .. code-block:: python from s3_upload_download import s3_transfers_file
bucket_name='test_bucket'
s3_folder='test_folder'
file_extension='.parquet'
base_dir='home/momataj/'
sourceDir=f'home/momataj/test_folder/'
s3_transfers_file.upload_s3_file(bucket_name,sourceDir,base_dir,file_extension)
Project details
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 s3_upload_download-0.0.4-py3-none-any.whl.
File metadata
- Download URL: s3_upload_download-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
682ef650efe2666122c64dc6654b54160a88a1b7e4a8859eacac0d051d92256b
|
|
| MD5 |
ff5baae645a4bd44f5319a11cba79f14
|
|
| BLAKE2b-256 |
b6af788361dd730bab453c542a1e1a5d4e4ece563f40a6eece0e13e1192d6635
|