Skip to main content

UpYun Storage SDK for Python S3 Support

Project description

又拍云存储-s3 支持

接口说明

获取服务列表

list_buckets

参数

参数 必选 类型 说明
None None None None

获取目录列表

list_folders

参数

参数 必选 类型 说明
bucket str 又拍云服务名称

获取目录文件列表

list_files

参数

参数 必选 类型 说明
bucket str 又拍云服务名称
folder str 又拍云服务目录

删除文件

delete_file

参数

参数 必选 类型 说明
bucket str 又拍云服务名称
file str 又拍云文件名称

删除目录

delete_folder

参数

参数 必选 类型 说明
bucket str 又拍云服务名称
folder str 又拍云服务目录

创建目录

create_folder

参数

参数 必选 类型 说明
bucket str 又拍云服务名称
folder str 又拍云服务目录

上传文件

upload_file

参数

参数 必选 类型 说明
bucket str 又拍云服务名称
file_path str 本地文件路径
object_name str 如果 object 为 None,则又拍云的存储文件名称为 file_path 文件名,并且存放位置是根目录

获取文件信息

get_file_info

参数

参数 必选 类型 说明
bucket str 又拍云服务名称
object_name str 又拍云存储文件名称

获取随机文件

get_random_file

参数

参数 必选 类型 说明
bucket str 又拍云服务名称
folder str 又拍云服务目录

下载文件

download_file

参数

参数 必选 类型 说明
bucket str 又拍云服务名称
object_name str 又拍云存储文件名称
file_path str 本地存储的文件路径及名称

生成预签名 URL

generate_presigned_url

参数 必选 类型 说明
bucket str 又拍云服务名称
object_name str 又拍云存储文件名称
expiration int 过期时间,单位秒,最大不能超过 604800,默认不填 3600 秒

代码示例

from upyuns3client.upyuns3client import UpYunS3Client
ak = "xxxxx"
sk = "xxxxx"
client = UpYunS3Client(ak, sk)
client.generate_presigned_url(
    bucket="test-bucket", object_name="test.png", expiration=3600
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upyuns3client-0.1.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

upyuns3client-0.1.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file upyuns3client-0.1.4.tar.gz.

File metadata

  • Download URL: upyuns3client-0.1.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for upyuns3client-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a433f49ba6de5808750e1b7b25b30906d45e11d8fca5ed6dcf221866b2b50f94
MD5 85ab2b95dc4b457e474026bd073ee9fe
BLAKE2b-256 bc24eabaeb9ea32813f370a31deb6e30e7a680fd580c0e45efcffafce97503af

See more details on using hashes here.

File details

Details for the file upyuns3client-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: upyuns3client-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for upyuns3client-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2c68d2f0a37e7f1a189400082e377ff6742977d647788be79c35a94572cedb4d
MD5 c907796900082c615f0c6a41f6848e28
BLAKE2b-256 acb6c100f1773b73fd8950fc5a07f8a9311f7b6e2455036212472a1ea72efc41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page