全部的描述
demobambu的Python项目详细描述
#入门
todo:添加说明
此sdk包依赖于其他python包,如nose、jsonpickle等。
这些依赖项在sdk附带的``requirements.txt``文件中定义。
要解决这些依赖项,可以使用pip依赖项管理器。按照[https://pip.pypa.io/en/stable/installing/](https://pip.pypa.io/en/stable/installing/)中的步骤安装它。
python和pip可执行文件应在路径中定义。打开命令提示符并键入``pip--version``.
如果安装成功并正确定义了路径,则应显示安装的pip依赖关系管理器的版本。
*使用命令行,导航到包含为sdk生成的文件(包括``requirements.txt```)的目录。
*运行命令``pip install-r requirements.txt```。这应该安装所有必需的依赖项。
![构建sdk-步骤1](https://apidocs.io/illustration/python?step=installdependencies&workspacefolder=bambu%20endpoint python)
在ide中打开项目
打开python ide,比如pycharm。如果您喜欢使用不同的编辑器或IDE,这里提供的基本工作流也适用。
![在PyCharm中打开项目-步骤1](https://apidocs.io/illustration/python?step=pycharm)
[在PyCharm中打开项目-第2步](https://apidocs.io/illustration/python?step=openproject0&workspacefolder=bambu%20endpoint python)
项目文件将显示在侧栏中,如下所示:
![在PyCharm中打开项目-第3步](https://apidocs.io/illustration/python?步骤=openproject1&workspacefolder=bambu%20endpoint python&;projectname=demobambu)
\2。添加一个新的测试项目
右键单击解决方案名称创建一个新目录,如下所示:
![在PyCharm中添加新项目-步骤1](https://apidocs.io/illustration/python?step=createdirectory&workspacefolder=bambu%20endpoint python&;projectname=demobambu)
将目录命名为"test"
![在PyCharm中添加新项目-步骤2](https://apidocs.io/illustration/python?step=nameditory)
将一个名为"testsdk"的python文件添加到此项目中
![在PyCharm中添加新项目-步骤3](https://apidocs.io/illustration/python?step=createfile&workspacefolder=bambu%20endpoint python&;projectname=demobambu)
将其命名为"testsdk"
![在PyCharm中添加新项目-步骤4](https://apidocs.io/illustration/python?step=namefile)
在您的python文件中,您需要使用以下代码行从demobambu.demobambu客户端导入demobambu client
```python
![在PyCharm中添加新项目-步骤4](https://apidocs.io/illustration/python?step=projectfiles&workspacefolder=bambu%20endpoint python&;libraryname=demobambu.demobambu_client&;projectname=demobambu&classname=demobambuclient)
示例代码在后续章节中给出。
3.运行测试项目
若要在测试项目中运行该文件,请右键单击测试项目中的python文件,然后单击"运行"`
![运行测试项目-步骤1](https://apidocs.io/illustation/python?step=runproject&workspacefolder=bambu%20endpoint python&libraryname=demobambu.demobambu廑客户端&projectname=demobambu&;classname=demobambuclient)
unittest用作测试框架,nose用作测试
运行器。您可以按如下方式运行测试:
1。从terminal/cmd导航到sdk的根目录。
2。调用``pip install-r test requirements.txt``
3。调用```````notests`````````notests``
>api客户端的初始化可以如下初始化。
```python
>client=demomobabububuclient()
```````````
"控制器"中的"控制器">;<;/a>;控制器列表[类:](https://apidocs.io/img/class.png.misc controller")misccontroller
\a name="Get_Expense_Estimator">;<;/a>;![方法:](https://apidocs.io/img/method.png".misccontroller.get_expense_estimator")get_expense_estimator
>;待办事项:添加说明
``python
def get_expens费用估算器(self)
````
````python
``python
misc控制器。get_expens费用估算器()
````````>
[返回控制器列表]
[返回控制器列表]<控制器列表(u控制器列表)
br/>
todo:添加说明
此sdk包依赖于其他python包,如nose、jsonpickle等。
这些依赖项在sdk附带的``requirements.txt``文件中定义。
要解决这些依赖项,可以使用pip依赖项管理器。按照[https://pip.pypa.io/en/stable/installing/](https://pip.pypa.io/en/stable/installing/)中的步骤安装它。
python和pip可执行文件应在路径中定义。打开命令提示符并键入``pip--version``.
如果安装成功并正确定义了路径,则应显示安装的pip依赖关系管理器的版本。
*使用命令行,导航到包含为sdk生成的文件(包括``requirements.txt```)的目录。
*运行命令``pip install-r requirements.txt```。这应该安装所有必需的依赖项。
![构建sdk-步骤1](https://apidocs.io/illustration/python?step=installdependencies&workspacefolder=bambu%20endpoint python)
在ide中打开项目
打开python ide,比如pycharm。如果您喜欢使用不同的编辑器或IDE,这里提供的基本工作流也适用。
![在PyCharm中打开项目-步骤1](https://apidocs.io/illustration/python?step=pycharm)
[在PyCharm中打开项目-第2步](https://apidocs.io/illustration/python?step=openproject0&workspacefolder=bambu%20endpoint python)
项目文件将显示在侧栏中,如下所示:
![在PyCharm中打开项目-第3步](https://apidocs.io/illustration/python?步骤=openproject1&workspacefolder=bambu%20endpoint python&;projectname=demobambu)
\2。添加一个新的测试项目
右键单击解决方案名称创建一个新目录,如下所示:
![在PyCharm中添加新项目-步骤1](https://apidocs.io/illustration/python?step=createdirectory&workspacefolder=bambu%20endpoint python&;projectname=demobambu)
将目录命名为"test"
![在PyCharm中添加新项目-步骤2](https://apidocs.io/illustration/python?step=nameditory)
将一个名为"testsdk"的python文件添加到此项目中
![在PyCharm中添加新项目-步骤3](https://apidocs.io/illustration/python?step=createfile&workspacefolder=bambu%20endpoint python&;projectname=demobambu)
将其命名为"testsdk"
![在PyCharm中添加新项目-步骤4](https://apidocs.io/illustration/python?step=namefile)
在您的python文件中,您需要使用以下代码行从demobambu.demobambu客户端导入demobambu client
```python
![在PyCharm中添加新项目-步骤4](https://apidocs.io/illustration/python?step=projectfiles&workspacefolder=bambu%20endpoint python&;libraryname=demobambu.demobambu_client&;projectname=demobambu&classname=demobambuclient)
示例代码在后续章节中给出。
3.运行测试项目
若要在测试项目中运行该文件,请右键单击测试项目中的python文件,然后单击"运行"`
![运行测试项目-步骤1](https://apidocs.io/illustation/python?step=runproject&workspacefolder=bambu%20endpoint python&libraryname=demobambu.demobambu廑客户端&projectname=demobambu&;classname=demobambuclient)
unittest用作测试框架,nose用作测试
运行器。您可以按如下方式运行测试:
1。从terminal/cmd导航到sdk的根目录。
2。调用``pip install-r test requirements.txt``
3。调用```````notests`````````notests``
>api客户端的初始化可以如下初始化。
```python
>client=demomobabububuclient()
```````````
"控制器"中的"控制器">;<;/a>;控制器列表[类:](https://apidocs.io/img/class.png.misc controller")misccontroller
\a name="Get_Expense_Estimator">;<;/a>;![方法:](https://apidocs.io/img/method.png".misccontroller.get_expense_estimator")get_expense_estimator
>;待办事项:添加说明
``python
def get_expens费用估算器(self)
````
````python
``python
misc控制器。get_expens费用估算器()
````````>
[返回控制器列表]
[返回控制器列表]<控制器列表(u控制器列表)
br/>