Updated on 2024-03-05 GMT+08:00

Configuring a Sample Project

For details about the sample code, see https://github.com/huaweicloud/huaweicloud-sdk-python-dis/tree/master/dis_sdk_python_demo.

Procedure

  1. After huaweicloud-python-sdk-dis has been published to PyPI, open Command Prompt and run the pip install huaweicloud-python-sdk-dis command to install huaweicloud-python-sdk-dis.
  2. Import the PyCharm project.

    1. Choose File > Open. The Open File or Project window is displayed.
    2. Select dis_sdk_python from the \Lib\site-packages Python installation directory. If you cannot find dis_sdk_python, upgrade pip or install huaweicloud-python-sdk-dis.

    3. Click OK.

  3. Configure the sdk_python project.

    1. In the navigation tree on the left, choose File > Settings > Editor > Font and set the font background color.
    2. In the navigation tree on the left, choose File > Settings > Project Interpreter and add Python.
    1. Select a proper project interpreter and click OK.
    Figure 1 Adding Python
    1. In the navigation tree on the left, choose File > Settings > Editor > File Encodings and set the PyCharm code.

      Set Global Encoding, Project Encoding, and Default encoding for properties files to UTF-8.