百度智能云

All Product Document

          Load Balance

          Installation

          Runtime Environment

          1.Runtime environment Python SDK toolkit can run under Python 2.7 and Python3.x.

          2.Entitlements and authentication To use Baidu AI Cloud products, you need to have a Baidu AI Cloud account and a valid AK (Access Key ID) and SK (Secret Access Key) for signature verification.

           You can obtain and understand your AK/SK information through the following steps: 
           1.[Register Baidu AI Cloud Account](https://login.bce.baidu.com/reg.html? tpl=bceplat&from=portal) 
          
           2.[Create AK/SK](https://console.bce.baidu.com/iam/? _=1513940574695#/iam/accesslist) 

          Install SDK

          Download and Install

          Method 1: Install via pip

          You can install the Baidu AI Cloud Python SDK into your environment through pip installation. Execute the following command on the command line in the networked state:

           pip install bce-python-sdk 

          You can install the Python SDK locally.

          Method 2: Download the source package locally and install it

          1.Download the Python SDK compressed toolkit at Developer Resource Center.

          2.Move the command line to the path of the compressed package and execute the following command (version is replaced with the version number in the package name):

           	 pip install bce-python-sdk-version.zip  
          
           You can install the Python SDK locally. 	 

          You can also execute the following command after decompressing the compressed package (version is replaced with the version number in the package name)

           cd bce-python-sdk-version 
          
           python setup.py install 

          to complete the SDK installation.

          SDK's directory structure

          com.baidubce
                 ├── auth                                        //BCE's signature 
                 ├── http                                        //BCE's Http communication related class 
                 ├── model                                       //BCE's public model class 
                 ├── services
                 │       └── blb                                 //BLB's service related class 
                 │           ├── app_blb_client.py               //APPBLB client entry class
                 │           └── blb_client.py                   //BLB's client entry class 
                 ├── bce_base_client.py                          //Base class of BCE client entry class 
                 ├── bce_client_configuration.py                 //Configuration of BCE's HttpClient 
                 ├── bce_response.py                             //Request class of BCE client 
                 ├── exception.py                               //BCEException class of BCE's client 
                 ├── protocol.py                                //Network protocol definition
                 ├── region.py                                  //Region processing module 
                 ├── retry_policy.py                            //Public configuration class of BCE service 
                 └── utils.py                                  //BCE's utility tool class 

          Uninstall SDK

          It is expected that you can uninstall "bce-python-sdk" using pip when uninstalling the SDK.

          Previous
          Overview
          Next
          Initialization