pip install huaweicloud-csms-environ
import csms
# basic
csms.load_env('secret-name', region='ap-southeast-2')
# project id instead of region
csms.load_env('secret-name', project_id='project-id')
# using pure environment variables
csms.load_env()
# no environment variables
csms.load_env(
'secret_name',
access_key='access-key',
secret_key='secret-key',
region='ap-southeast-2',
)
Key | SDK | Description |
---|---|---|
HUAWEICLOUD_SDK_AK |
Yes | Access key of Huawei Cloud IAM |
HUAWEICLOUD_SDK_SK |
Yes | Secret key of Huawei Cloud IAM |
HUAWEICLOUD_SDK_PROJECT_ID |
Yes | Huawei Cloud project ID |
HUAWEICLOUD_REGION |
No | Huawei Cloud region |
HUAWEICLOUD_SECRET_NAME |
No | CSMS secret name |
For more SDK variables, please see this.
- Docker
- Python
- Poetry
make lint
make test
make yapf