Skip to content

rootcss/pythons3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pythons3

Fastest & Easiest way to upload data on AWS S3.

Usage:

Define AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY within the code or environmental variables and execute the following code:

from pythons3 import PythonS3
PythonS3().upload('my_file.csv')

or, because humans do typos!

from pythons3 import Pythons3
Pythons3().upload('my_file.csv')

or, because some people have multiple use cases:

from pythons3 import PythonS3
PythonS3(bucket_name="my-bucket-name").upload('my_file.csv')
# OR
PythonS3(bucket_name="my-bucket-name", key="myfilename.csv").upload('my_file.csv')
# OR
PythonS3(bucket_name="my-bucket-name", path="directory/myfilename.csv").upload('my_file.csv')
# Above line will copy the file "my_file.csv" to "my-bucket-name/directory/myfilename.csv" in S3

Note: key and path parameters are aliases.

Installation:

git clone https://github.com/rootcss/pythons3
python setup.py install

Uninstallation:

pip uninstall pythons3

TODO:

  • Multithreading support for multiple files.
  • Determine file size before uploading.

About

Simplest way to upload a file to S3. One-liner.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages