Skip to main content

A Simple OSS SDK Integration. Include Aliyun, Qiniu, Qcloud, Maybe more

Project description

A Simple OSS SDK Integration. Include Aliyun, Qiniu, Qcloud, Maybe more

Very Easy for use!

from sun_oss import get_aliyun_bucket, get_qiniu_bucket, get_qcloud_bucket

# aliyun access_key_id = os.getenv(‘ALI_OSS_ACCESS_KEY_ID’, ‘<your ALI_OSS_ACCESS_KEY_ID>’) access_key_secret = os.getenv(‘ALI_OSS_ACCESS_KEY_SECRET’, ‘<your ALI_OSS_ACCESS_KEY_SECRET>’) endpoint = os.getenv(‘ALI_OSS_ENDPOINT’, ‘<your ALI_OSS_ENDPOINT>’) bucket_name = os.getenv(‘BUCKET_NAME’, ‘<your BUCKET-NAME>’) ali_bucket = get_aliyun_bucket(access_key_id, access_key_secret, bucket_name, endpoint)

#qiniu access_key_id = os.getenv(‘QINIU_OSS_ACCESS_KEY_ID’, ‘<your QINIU_OSS_ACCESS_KEY_ID>’) access_key_secret = os.getenv(‘QINIU_OSS_ACCESS_KEY_SECRET’, ‘<your QINIU_OSS_ACCESS_KEY_SECRET>’) bucket_name = os.getenv(‘BUCKET_NAME’, ‘<your BUCKET-NAME>’) qiniu_bucket = get_qiniu_bucket(access_key_id, access_key_secret, bucket_name)

access_key_id = os.getenv(‘TENTCENT_OSS_ACCESS_KEY_ID’, ‘<your TENTCENT_OSS_ACCESS_KEY_ID>’) access_key_secret = os.getenv(‘TENTCENT_OSS_ACCESS_KEY_SECRET’, ‘<your TENTCENT_OSS_ACCESS_KEY_SECRET>’) region = os.getenv(‘TENTCENT_REGION’, ‘<your BUCKET-NAME>’) qcloud_bucket = get_qcloud_bucket(access_key_id, access_key_secret, region, bucket_name)

#upload ret = ali_bucket.put_object(upload_file)

github: https://github.com/PINKONG/sun-oss-python

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

sun_oss-0.1.3.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file sun_oss-0.1.3.tar.gz.

File metadata

  • Download URL: sun_oss-0.1.3.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sun_oss-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c3f42c257082ffdf39dc6a9ec3da0a6e6d6a69a0329c49cfa241a5a3350621e6
MD5 f73187f1bf74db86455cab5fcb90be77
BLAKE2b-256 9c5969e67f8c646e5cf50e8ec87f250a40807a46c4d5ade6e298a7f206e9b8c1

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