一个python模块,用于使用s3多部分api将数据上传到s3

s3upload的Python项目详细描述


https://travis-ci.org/leetreveil/pys3upload.png

一个python模块,用于使用多部分api将数据上传到s3。

安装

通过pip

安装
$ pip install s3upload

cli

使用s3upload cli从stdin或从命令行上提供的数据上载。

Usage: s3upload [options]

Options:
  -h, --help            show this help message and exit
  -b BUCKET, --bucket=BUCKET
                        the s3 bucket to upload to
  -k KEY, --key=KEY     the name of the key to create in the bucket
  -K AWS_KEY, --aws_key=AWS_KEY
                        aws access key
  -s AWS_SECRET, --aws_secret=AWS_SECRET
                        aws secret key
  -d DATA, --data=DATA  the data to upload to s3 -- if left blank will be read
                        from STDIN
  -t THREADS, --threads=THREADS
                        number of threads to use while uploading in parallel

模块

您还可以使用python中的模块进行接口:

>>>froms3uploadimportupload
defupload(bucket,aws_access_key,aws_secret_key,iterable,key,progress_cb=None,threads=5,replace=False,secure=True):''' Upload data to s3 using the s3 multipart upload API.

    Args:
        bucket: name of s3 bucket
        aws_access_key: aws access key
        aws_secret_key: aws secret key
        iterable: The data to upload. Each 'part' in the list
        will be uploaded in parallel. Each part must be at
        least 5242880 bytes (5mb).
        key: the name of the key to create in the s3 bucket
        progress_cb: will be called with (part_no, uploaded, total)
        each time a progress update is available.
        threads: the number of threads to use while uploading.
        replace: will replace the key in s3 if set to true. (Default is false)
        secure: use ssl when talking to s3. (Default is true)
'''

许可证

麻省理工学院

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Rest DSL路由无法启动路由,因为同一端点不允许有多个使用者   jvm有没有像JConsole或VisualVM这样的工具可以告诉我“类、对象、引用变量在java中存储在哪里?”   java为什么我的列表中的所有元素看起来都一样?   java运行时。运行shell脚本的exec无法打开文件   JPopupMenu的JMenuItem的java热键   会话在Java中被覆盖   如何在java中去除字符串中的尖锐重音?   java Mockito监视一个接口,模拟它的默认方法,获取NullPointerException   javascript如何在jquery中禁用同一时间选择   将数组列表附加到现有CSV文件,但它会附加并清除存储在Java文件中的以前的数据   java从我的jar中访问pdf文件   java Sonar issue参数必须为非Null,但标记为可为Null   java Salesforce流式API:在网络故障之后和重新订阅之前获取事件   在Java 1.8.0_65上运行Play2.0应用程序时出现playframework错误   java为什么字母的ASCII由方法自动转换。toCharArray()?   java如何知道JDialog是否关闭?   java向服务器发送POST请求,服务器的响应为null,启动   java如何设置JTable中特定单元格的值?   ImagePlus中的java保存问题