joerx / ali-sdk-demo

Quick python demo for Aliyun SDKs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aliyun SDK Demo

Quick python demo for Aliyun SDKs

Preconditions

  • Aliyun account
  • Valid credentials for API access

OSS Example

  • Prepare venv and install requirements
virtualenv venv -p $(which python3)
. venv/bin/activate
pip install -r requirements.txt
  • Setup environment
export ALIYUN_ACCESS_KEY_ID=...
export ALIYUN_ACCESS_KEY_SECRET=...
export OSS_ENDPOINT=http://oss-ap-southeast-3.aliyuncs.com # optional
export OSS_BUCKET='my-demo-bucket'
  • Run example
python oss.py

About

Quick python demo for Aliyun SDKs

License:Apache License 2.0


Languages

Language:Python 100.0%