PluentMarkets API的接口。

plenty-api的Python项目详细描述


概述

PluentMarkets API的接口。在

设置

要求

  • Python 3.7.8+

安装

将其直接安装到激活的虚拟环境中:

$ pip install python_plenty_api

或将其添加到您的Poetry项目中:

^{pr2}$

使用

安装后,可以导入包:

$ python
>>> import plenty_api
>>> plenty_api.__version__

示例

import plenty_api

def main():
    # Get the bearer token and set the basic attributes for an endpoint
    plenty = plenty_api.PlentyApi(base_url='https://{your-shop}.plentymarkets-cloud01.com',  # available under setup->settings->API->data
                                  use_keyring=True,  # Save the credentials into your system wide Keyring or not
                                  data_format='json',  # Choose the output format (default JSON)
                                  debug=True)  # display the constructed endpoint before making the request

    orders = plenty.plenty_api_get_orders_by_date(start='2020-09-20',
                                                  end='2020-09-24',
                                                  date_type='payment',  # Get orders that were payed in between [start] and [end]
                                                  additional=['documents', 'locations'],  # Include additional attributes to the response
                                                  refine={'orderType': '1', 'referrerId': '1'})  # Only get orders with type 1 and from referrer 1

if __name__ == '__main__':
    main()

联系人

作者:Sebastian Fricke,公司:Panasiam,电子邮件:sebastian.fricke.linux@gmail.com

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

推荐PyPI第三方库


热门话题
Java调用外部进程exe   java跨源请求阻止Spring REST服务+AJAX   运行Eclipse创建的JAR时未显示java图像   带有自定义适配器的TimerTask期间的java更新列表视图   Java Netbeans 7.01中的swing注册表单空指针异常   java如何向所有HttpClient请求方法添加参数?   为什么在将json映射到JavaBean的过程中,Spring MVC将参数[“”]转换为[null]?   创建名为“messageDispatcher”的bean时发生java错误   java Apache骆驼线程JDBC   java Spring引导请求添加bean,即使存在   java如何以正确的方式编写单例?   JavaSpringBoot试图使用@JsonTest注释在测试中创建mongo存储库   java Android将gmt时间转换为可读日期   java“Serializable无法解析为类型”   spring我可以在Java注释中使用ScopedProxy模式时访问JobExecutionContext吗   java slf4j apache tomcat eclipse   通过HashMap的java循环   java无法在两个活动之间更改TextView?