fastbill api的瘦python包装器

fastbill的Python项目详细描述


用于fastbill的http api的超薄python包装器,由STYLIGHT开发。

https://travis-ci.org/stylight/python-fastbill.svg?branch=masterhttps://img.shields.io/pypi/pyversions/fastbill.svghttps://img.shields.io/pypi/dm/fastbill.svg

最新版本:

fastbill 0.7.3

  • Bugfix release. In the case of an successful HTTP response without a valid JSON structure the wrapper would crash.
  • Tests which would catch this bug were not run due to test misconfiguration. This is fixed as well.

fastbill 0.7.2

  • Add configurable timeout to all API calls. The default timeout is 1 minute. This could lead to unexpected timeout exceptions, you’ll need to handle.

fastbill 0.7.1

  • Bugfix release for name parameter.

fastbill 0.7.0

  • Warning: This release has a bug. The ‘name’ parameter will break on str types on Python2. Use 0.7.1 instead.
  • Potentially breaking change: Restructure fastbill module into package with each component having it’s own module. Your imports may break.

fastbill 0.6.1

  • Added mock library to setup.py

fastbill 0.6.0

  • Breaking change: Don’t throw a KeyError, but rather an AttributeError on FastbillResponse.currency property
  • Add pre- and post-request callbacks

fastbill 0.5.2

  • Added NOK to CURRENCIES dict.

fastbill 0.5.1

  • Support pickling of FastbillResponse objects. The link to the API connection will not be pickled though. API credentials will also not be pickled.

fastbill 0.5.0

  • Introduce name parameter to better distinguish FastbillWrapper instances.

fastbill 0.4.3

  • Bugfix release.
  • Calls to potential special methods like __unicode__ would lead to an erroneous Fastbill API call.

fastbill 0.4.2

  • Improved debug logging.
  • Deprecated `FastbillHttpError` Execption. Now only FastbillResponseError will be raised. FastbillResponseError will inherit from FastbillHttpError for the time being, but catching FastbillHttpError is deprecated. Use FastbillResponseError instead.
  • Improved testcase to check for failing API calls as well.

fastbill 0.4.1

  • Experimental: Improved FastbillResponse to allow ORM like object traversals. Use with caution.
  • Added property currency which looks up the proper ISO 4217 currency abbreviation when a CURRENCY_CODE integer is present in the response. An AttributeError will be raised when it’s not present.

限制:

  • 仅支持JSON有效负载
  • 不会(过度)检查响应的一致性
  • 不将日期字符串转换为日期时间对象

依赖关系:

  • 请求
  • 六个(用于python 2/3兼容性)

安装:

pip install fastbill

用法:

fromfastbillimportFastbillWrapper# Construct the api client for Fastbill's automatic APIclient=FastbillWrapper('fastbill_user','fastbill_key')# You can also specify a service_url, in case you need Fastbill's core API instead:core_client=FastbillWrapper('fastbill_user','fastbill_key',service_url='endpoint_url')# Make requests, e.g. service customer.createclient.customer_create(data={})# Search for customer, subscriptions, etc...forcustomerinclient.customer_get(filter={'city':'Munich'}):printcustomer# But you can also see the full resultresult=client.customer_get(filter={'city':'Munich'})printresult.keys()# Will give you 'CUSTOMERS'

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

推荐PyPI第三方库


热门话题
java无法启动应用程序:JNLP错误   java根据用户输入在PreparedStatement中使用setTime()或setNull()   java EJB与同步   java以object为键通过hashmap进行搜索   java中的模10^9+7   针对包含其他对象的对象的java OOP最佳实践   如何将字符串作为HTML代码从Java文件读取到JSP页面?   java我的POM怎么了?“解析表达式..检测到递归表达式循环”   用于Hbase的Mapreduce的java NoSuchMethodError   JAVAlang.SecurityException:权限拒绝:启动意图{act=安卓.Intent.action.MAIN cat=[安卓.Intent.category.LAUNCHER]   数组初始化谜语Java   通过arraylist搜索时的java句柄关联