Versions Supported
Language Stats
Repo Stats
Activity
Build Status
Python module to upload an entire directory to an S3 bucket.
pip install PyS3Uploaderimport pys3uploader
if __name__ == '__main__':
wrapper = pys3uploader.Uploader(
bucket_name="BUCKET_NAME",
upload_dir="FULL_PATH_TO_UPLOAD",
exclude_prefix="PART_OF_UPLOAD_DIR_TO_EXCLUDE"
)
wrapper.run_in_parallel()import pys3uploader
if __name__ == '__main__':
wrapper = pys3uploader.Uploader(
bucket_name="BUCKET_NAME",
upload_dir="FULL_PATH_TO_UPLOAD",
exclude_prefix="PART_OF_UPLOAD_DIR_TO_EXCLUDE"
)
wrapper.run()- bucket_name - Name of the s3 bucket.
- upload_dir - Directory to upload.
- s3_prefix - S3 object prefix for each file. Defaults to
None - exclude_prefix - Path in
upload_dirthat has to be excluded in object keys. Defaults toNone - skip_dot_files - Boolean flag to skip dot files. Defaults to
True - overwrite - Boolean flag to overwrite files present in S3. Defaults to
False - file_exclusion - Sequence of files to exclude during upload. Defaults to
None - folder_exclusion - Sequence of directories to exclude during upload. Defaults to
None - logger - Bring your own custom pre-configured logger. Defaults to on-screen logging.
- log_handler - Choose between
stdoutvsfilelogging. Defaults topys3uploader.LogHandler.stdout - log_level - Choose the logging level. Defaults to
pys3uploader.LogLevel.debug - env_file – Path to a
.envfile for loading environment variables. Defaults to scanning the current directory. - region_name - AWS region name. Defaults to the env var
AWS_DEFAULT_REGION - profile_name - AWS profile name. Defaults to the env var
PROFILE_NAME - aws_access_key_id - AWS access key ID. Defaults to the env var
AWS_ACCESS_KEY_ID - aws_secret_access_key - AWS secret access key. Defaults to the env var
AWS_SECRET_ACCESS_KEY
AWS values are loaded from env vars or the default config at
~/.aws/config/~/.aws/credentials
Docstring format: Google
Styling conventions: PEP 8
Clean code with pre-commit hooks: flake8 and
isort
Requirement
python -m pip install gitverseUsage
gitverse-release reverse -f release_notes.rst -t 'Release Notes'pre-commit will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL
markdown files (including Wiki pages)
Requirement
pip install sphinx==5.1.1 pre-commit recommonmarkUsage
pre-commit run --all-fileshttps://pypi.org/project/PyS3Uploader/
https://thevickypedia.github.io/PyS3Uploader/
© Vignesh Rao
Licensed under the MIT License