如何在Python模块中使用API​​? [英] How can I use APIs in Python module?

查看:71
本文介绍了如何在Python模块中使用API​​?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的python代码中,我想包含以下API:

In my python code I want to include the following API:

https://github.com/timotheus/ebaysdk-python

https://github.com/timotheus/ebaysdk-python

如何在"Execute Python Module"(执行Python模块)中执行此操作?在Azure ML Studio中?

How can I do it at "Execute Python Module" in Azure ML Studio?

推荐答案

尝试一下,对我来说效果不错.首先在本地Python环境中安装该软件包.然后压缩包文件夹(例如,在安装后在Anaconda3/Lib/site-packages中创建的Anaconda中).将zip文件作为数据集上载到AML Studio中. 将模块拖到实验画布中,并将其连接到"Execute Python Module"(执行Python模块)的第三个输入,称为"Script Bundle"(脚本包).然后,在脚本的开头使用import来使用API​​.仅此而已!

Try this, it worked ok for me. Install first the package in your local Python environment. Then zip the package folder (for instance in Anaconda it's created in Anaconda3/Lib/site-packages after installation). Upload the zip file as a dataset in AML Studio. Drag the module in your experiment canvas and connect it to the 3rd input of the "Execute Python Module", called "Script Bundle". Then at the beginning of your script use import to be able to use the API. And that's all!


这篇关于如何在Python模块中使用API​​?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆