Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Package to add bwi methods into your project

Project description

BWI-lib

python client for BWI interactions

Usage

Instantiate a client

import bwi


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

Manipulate your logs

# provide step duration
with client.Step('fetch client information') as bwi:
    bwi.logger.info('found client with user id %d', 18)

Metric management

# manipulate metrics
client.Step('validate order')
# Your business-oriented code goes here
# ...
total_paid = 220

# increment the income metric for this step
bwi.metrics.inc('income', total_paid)

Error-handling

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

Mark a step as (un)succesful

step = bwi.Step('process order')

# Your business-oriented code goes here
step.success()

# other scenario, where thing go bad
step.failed()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bwi, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size bwi-0.0.8-py3-none-any.whl (3.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size bwi-0.0.8.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page