Skip to main content

An errbit client for python

Project description

An errbit client for python.

Installation

Add errbit to your package dependencies in setup.py or requirements.txt.

Configuration

Configure errbit with environment variables:

  • ERRBIT_URL - the post-url to your errbit installation.

  • ERRBIT_API_KEY - your errbit API key.

  • ERRBIT_PACKAGE - the setuptools name of your package.

  • ERRBIT_ENVIRONMENT - the name of the environment you are running, such as staging or production.

Usage

The errbit package ships with the core notification implementation for errbit and integrations for some frameworks.

Manually posting exceptions

Use the errbit client to post exceptions to an errbit installation:

from errbit.client import Client
import sys

client = Client()
try:
    do_something()
except:
    exc_info = sys.exc_info()

    request = {
        'url': 'http://my.app/app/folders/create',
        'component': 'folders',
        'action': 'create',
        'params': {
            'title': 'My Folder'},
        'session': {
            'cookie': 'session_id=123345'},
        'cgi-data': {
            'HTTP_X_FORWARDED_HOST': 'my.app'}}

    client.post(exc_info, request=request)

Plone

Plone integration is automatically done with a logging handler, nothing needs to be done for enabling it beside configuring the environment variables.

Development / tests

Install the package and run the tests using buildout:

git clone git@github.com:4teamwork/errbit-python.git
cd errbit-python
ln -s test-plone-4.3.x.cfg buildout.cfg
python2.7 bootstrap.py
bin/buildout
bin/test

Changelog

1.0.0 (2013-08-27)

  • Initial implementation. [jone]

Project details


Download files

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

Source Distribution

errbit-1.0.0.zip (20.0 kB view details)

Uploaded Source

File details

Details for the file errbit-1.0.0.zip.

File metadata

  • Download URL: errbit-1.0.0.zip
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for errbit-1.0.0.zip
Algorithm Hash digest
SHA256 ae94b01a205e3cf7951c98797e567770938e3c608bd80bf62b4a7c140d249ff4
MD5 41685c6402931ec3e8ea63865ad85305
BLAKE2b-256 db4824fad7423a317bd15cf82626f3216cce2a9c7c5c5eefa8cfa0569c370c68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page