推荐服务API

reze的Python项目详细描述


雷泽

一个Python客户机,便于使用Reze推荐API。在

如果您在Reze还没有帐户,您可以创建一个免费帐户here

安装

使用pip安装客户端:

pip install reze

(如果使用python3,请使用pip3而不是pip)

示例

# importfromreze.api_clientimportRezeClientfromreze.api_requestsimportSalebotAddInteraction,SalebotBoughtTogether,SalebotItemsToItemapp_id="your_app_id"app_key="your_key"server_url="current_reze_api_server"client=RezeClient(app_id,app_key,server_url)# Send the data to Rezerequest_add_interaction=SalebotAddInteraction(1,"tag_content",1,"VIEW")print(client.send(request_add_interaction))# Get recommendationsrequest_bought_together=SalebotBoughtTogether("bô")recommended_bought_together=client.send(request_bought_together)print("Bought together items: ")fortaginrecommended_bought_together['data']:print(tag['tag'])# Get recommendationsrequest_items_to_item=SalebotItemsToItem("bô")recommended_items_to_item=client.send(request_items_to_item)print("Recommended items to item: ")fortaginrecommended_items_to_item['data']:print(tag['tag'])

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java向嵌入式Jetty添加多个端点   java如何在JAXWS处理程序中区分请求和响应?   使用Scenebuilder for JAVAFx的登录应用程序的java MVC体系结构   java对话框将不显示   Windows 7上的Java系统变量   java删除动态添加的面板   java将Javadoc嵌入到HTML网站中   带有URL编码数据的java Spring RestTemplate POST请求   java JAXR只运行一次函数   HttpClient缺少java依赖项   java深层反射比较   基于javarmi和CORBA的分布式计算   如何使用当前数据库时间从Java更新MongoDB?   java通过光标保存数据调试时显示错误数据