Skip to content

arunstar/uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uploader

uploader python module uploads files from a directory to AWS S3 and Google Cloud Storage (GCS). It supports a variety of file types and uses a configuration file for easy customization.

Installation

You can install this module using pip:

pip install .

Usage

from uploader import FileUploader uploader = FileUploader('config.ini') # or 'config.ini', 'config.json', or a dictionary directory_to_upload = '/path/to/your/directory' uploader.upload_files(directory_to_upload)

Expected format for config file

[AWS] s3_bucket = sacumen_bucket_name s3_access_key = sacumen_s3_access_key s3_secret_key = sacumen_s3_secret_key [GCS] gcs_bucket = sacumen_project_id gcs_credentials = sacumen_gcs_credentials_json_file_path [FileTypes] s3_file_types = jpg,png,svg,webp,mp3,mp4,mpeg4,wmv,3gp,webm gcs_file_types = doc,docx,csv,pdf

Run tests

pytest

Run tests (with coverage)

pytest --cov=uploader # With html report pytest --cov=. --cov-report html

About

Common file upload util that supports AWS S3 and GCS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages