Downloading and Installing an SDK

This topic provides the download links and installation methods of OBS SDK for Python.

Downloading OBS SDK for Python

Latest version of OBS Python SDK source code: Download

Installing OBS SDK for Python

You can use the methods listed in Table 1 to install OBS SDK for Python.

Table 1 Methods of installing OBS SDK for Python

No.

Method

1

Installing Using the Source Code

2

Installing the SDK Using setuptools

Method: Installing the SDK Using the Source Code

The following procedures show an example of installing the latest version of OBS Python SDK.

  1. the SDK package and decompress it.

  2. Run pip install pycryptodome==3.10.1 to install the cryptographic library.

  3. Decompress the development package to obtain folder src (SDK source code), folder examples (sample code), file README.txt (feature description file of SDK versions), and file log.conf (SDK log configuration file).

  4. Use PyCharm to create a project, copy the folders and files obtained in the previous step to the project, right-click folder src, and choose Mark Directory as > Sources Root.

    Note

    After the configuration, the directory structure is similar to the following:

    ├── examples

    ├── src

    ├── log.conf

    └── README.md

Method: Installing the SDK Using setuptools

The following procedures show an example of installing the latest version of OBS Python SDK.

  1. the SDK package and decompress it.

  2. Download and install setuptools.

  3. On the command-line interface (CLI), go to folder src under the directory where the development package is decompressed.

  4. Run the python setup.py install command to install the SDK.

  5. After the installation, check whether a folder named esdk_obs_python-<versionId>-*.egg is generated in Lib/site-package under the Python installation directory.

    Note

    • If you use this method to install the SDK, you need to delete folder esdk_obs_python-<versionId>-*.egg when you re-install the SDK.

    • If SDK modules cannot be loaded after you have performed the previous steps, you can directly add the absolute path of the src directory in OBS Python SDK to the sys.path list.