version: 0.1.4
A 3rd-party SDK for Qcloud COS and Python 3
Docs: https://su27.github.io/qcloud_cos_py3/
Use pip to install:
$ pip install qcloud_cos_py3
Or clone the repo:
$ git clone https://github.com/su27/qcloud_cos_py3.git
$ python setup.py install
$ virtualenv -p python3.6 venv
$ source venv/bin/activate
$ pip install -r requirements.txt
Tests rely on COS credentials which can be provided by setting the following environment variables:
QCLOUD_APP_ID
QCLOUD_SECRET_ID
QCLOUD_SECRET_KEY
QCLOUD_BUCKET
QCLOUD_REGION # optional, defaults to "sh"
Alternatively, copy tests/config_example.py to tests/config.py and fill in
the values. After configuration run:
$ make test-coverage
It's originally forked from cos-python3-sdk
Async uploads use Python's standard asyncio to offload the synchronous
upload_file call to a background thread. No external dependencies are
required.
Please check tests/test_cos.py