Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install zilch

How to install zilch

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install zilch
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.3 Available View build log
0.1.2 Available View build log
0.1.1 Available View build log
Windows (64-bit)
0.1.3 Available View build log
0.1.2 Available View build log
0.1.1 Available View build log
Mac OS X (10.5+)
0.1.3 Available View build log
0.1.2 Available View build log
0.1.1 Available View build log
Linux (32-bit)
0.1.3 Available View build log
0.1.2 Available View build log
0.1.1 Available View build log
Linux (64-bit)
0.1.3 Available View build log
0.1.2 Available View build log
0.1.1 Available View build log
 
Author
License
MIT
Imports
Lastest release
version 0.1.3 on Jan 14th, 2012

zilch

zilch is a small library for recording and viewing exceptions from Python. This library is inspired by (and uses several of the same functions from) David Cramer's Sentry, but aims to implement just the core features in a smaller code/feature footprint.

Requirements
Optional
Basic Usage
Reporting an Exception

In the application that wants to report errors, import zilch and configure the reporter to record directly to the database:

from zilch.store import SQLAlchemyStore
import zilch.client

zilch.client.store = SQLAlchemyStore('sqlite:///exceptions.db')

Then to report an exception:

from zilch.client import capture_exception
try:
    # do something that explodes
except Exception, e:
    capture_exception()

The error will then be recorded in the database for later viewing.

Advanced Usage

In larger cluster scenarios, or where latency is important, the reporting of the exception can be handed off to ZeroMQ to be recorded to a central recorder over the network. Both the client and recording machine must have ZeroMQ installed.

To setup the client for recording:

import zilch.client

zilch.client.recorder_host = "tcp://localhost:5555"

Then to report an exception:

from zilch.client import capture_exception
try:
    # do something that explodes
except Exception, e:
    capture_exception()

The exception will then be sent to the recorder_host listening at the recorder_host specified.

Recording Exceptions Centrally

The recorder uses ZeroMQ to record exception reports delivered over the network. To run the recorder host, on the machine recording them run:

>> zilch-recorder tcp://localhost:5555 sqlite:///exceptions.db

Without a Recorder running, ZeroMQ will hold onto the messages until it is available. After which point, it will begin to block (In the future, an option will be added to configure the disk offloading of messages).

The recorder will create the tables necessary on its initial launch.

Viewing Recorded Exceptions

zilch comes with a Pyramid web application to view the database of recorded exceptions. Once you have installed Pyramid and WebHelpers, you can run the web interface by typing:

>> zilch-web sqlite:///exceptions.db

Additional web configuration parameters are available to designate the host/port that the web application should bind to (viewable by running zilch-web with the -h option).

License

zilch is offered under the MIT license.

Authors

zilch is made available by Ben Bangert.

Support

zilch is considered feature-complete as the project owner (Ben Bangert) has no additional functionality or development beyond bug fixes planned. Bugs can be filed on github, should be accompanied by a test case to retain current code coverage, and should be in a Pull request when ready to be accepted into the zilch code-base.

For a more full-featured error collector, Sentry now has a stand-alone client that no longer requires Django called Raven. zilch was created before Raven was available, and the author now uses Raven rather than zilch most of the time.

zilch

0.1.3 (01/13/2012)
Features
  • Applied pull request from Marius Gedminas to add prefix option support to the error view webapp.
0.1.2 (08/07/2011)
Bug Fixes
  • Cleanup session at end of request.
0.1.1 (07/25/2011)
Bug Fixes
  • Fix bug with webob imports in client.py
0.1 (07/25/2011)
Features
  • Exception reporting via SQLAlchemy and/or ZeroMQ
  • Recording Store can be pluggable
  • WSGI Middleware to capture exceptions with WSGI/CGI environment data
  • Web User Interface for the recorder to view collected exceptions
  • Event tagging to record additional information per exception such as the Hostname, Application, etc.

Subscribe to package updates

Last updated Jan 14th, 2012

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.