# HuaweiCloud Python Software Development Kit (Python SDK)
The HuaweiCloud Python SDK allows you to easily work with Huawei Cloud services such as Elastic Compute Service (ECS) and Virtual Private Cloud(VPC) without the need to handle API related tasks.
This document introduces how to obtain and use HuaweiCloud Python SDK.
## Getting Started
- To use HuaweiCloud Python SDK, you must have Huawei Cloud account as well as the Access Key and Secret key of the HuaweiCloud account.
The accessKey is required when initializing `{Service}Client`. You can create an AccessKey in the Huawei Cloud console. For more information, see [My Credentials](https://support.huaweicloud.com/en-us/usermanual-ca/en-us_topic_0046606340.html).
- HuaweiCloud Python SDK requires python 3 or later.
## Install Python SDK
HuaweiCloud Python SDK supports Python 3 or later. Run ``python --version`` to check the version of Python.
- Use python pip
Run the following command to install the individual libraries of HuaweiCloud services:
```bash
# Install the core library
pip install huaweicloudsdkcore
# Install the VPC management library
pip install huaweicloudsdkvpc
```
- Install from [source](https://github.com/huaweicloud/huaweicloud-sdk-python-v3)
Run the following command to install the individual libraries of HuaweiCloud services:
```bash
# Install the core library
cd huaweicloudsdkcore-${version}
python setup.py install
# Install the VPC management library
cd huaweicloudsdkvpc-${version}
python setup.py install
```
## Use Python SDK
1. Import the required modules as follows:
```python
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcore.http.http_config import HttpConfig
.with_stream_log(log_level=logging.INFO) \ # Write log to console
.with_enable_http_log(True) \ # log whole http request and response
.build()
```
**where:**
-`endpoint`: service specific endpoints, see [Regions and Endpoints](https://developer.huaweicloud.com/intl/en-us/endpoint).
-`with_file_log`:
-`path`: log file path.
-`log_level`: log level, default is INFO.
-`max_bytes`: size of single log file, default is 10485760 bytes.
-`backup_count`: count of log file, default is 5.
-`with_stream_log`:
-`stream`: stream object, default is sys.stdout.
-`log_level`: log level, default is INFO.
**Warning**
-`with_enable_http_log`: We recommend you only use this for debugging purposes. Disable it in your production environments, as it records the whole request and response data, which may contains sensitive data, and it could be very large.