将bwi方法添加到项目中的包

bwi的Python项目详细描述


BWI库

python客户端,用于BWI交互

使用

实例化客户端

importbwiclient=bwi.Client(api_key='xxxxxxxxxxxxxxxx',workflow='shop')

操作日志

^{pr2}$

度量管理

# manipulate metricsclient.Step('validate order')# Your business-oriented code goes here# ...total_paid=220# increment the income metric for this stepbwi.metrics.inc('income',total_paid)

错误处理

# report any unknown exception to the bwi handlertry:# Your business-oriented code goes hereexceptExceptionaserr:bwi.handler.catch(err)# the error is now available for this specific step

将步骤标记为(未)成功

step=bwi.Step('process order')# Your business-oriented code goes herestep.success()# other scenario, where thing go badstep.failed()

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

推荐PyPI第三方库


热门话题
java如何将cassandra中的行数据转换为与列相关的嵌套json   java如何使用jcr XPath在jcr:content/@jcr:data中搜索?   java在使用openCV进行安卓开发时如何利用手机的广角镜头   java解析扩展了接口,结束了一个潜在的无限循环   位置服务的@Override方法中存在java Android应用程序错误   java本地线程的用途和需求是什么   具有左右子访问的java节点树遍历   java验证JsonWebToken签名   JUL日志处理程序中的java日志记录   嵌入式Java读取给定时间段的串行数据。   java有没有办法从多个URL获取多个图像?   java线程通过等待intent阻止自己发送intent   java Spring MVC解析多部分内容请求   java JPA/Hibernate静态元模型属性未填充NullPointerException   java格式错误的字符(需要引号,得到I)~正在处理   java为什么PrintWriter对象抛出FileNotFoundException?   java Neo4j未正确保存标签   java IE不加载图像