Inupy: fork/port of Dozer
inupy is meant to be a combination of the tools of Dozer into a single WSGI middleware providing a combined user panel. The tools are:
- memory profiler
- CPU profiler
- capture of logging messages
Example screenshot of the control panel pop down:
You can enable inupy for your application by editing your WSGI factory function, or your PasteDeploy configuration file.
Option 1: add this to your
development.ini (or whatever you call your
PasteDeploy config file):
[filter-app:inupy] use = egg:Inupy # ... options ... next = main # assuming your main wsgi app is [app:main]
and then to use it, run
paster serve development.ini -n inupy. If you do
not specify the
-n bit, inupy is disabled.
Option 2: change your
development.ini like this:
[filter:inupy] use = egg:Inupy # ... options ... [pipeline:main] pipeline = inupy ... yourapp # assuming your main wsgi app is [app:yourapp]
inupy is always availabe.
Option 3: edit your
middleware.py (assuming a Pylons style project) like
import inupy def make_app(...): ... if asbool(config['debug']): app = inupy.setup(app, config) app.config = config return app
this way it is enabled only if you have
debug = true in your
Your application config should have options set for the various tools you wish to enable, e.g.
set inupy.profiler = true set inupy.logview = true set inupy.profile_path = /home/user/tmp/profiles inupy.color.sqlalchemy = #faa inupy.color.pylons.templating = #bfb
TODO: document them all
Goals and inspiration
Some goals are to embed a version of jQuery into its own namespace so it doesn't collide with the installed applications, but gives us some tools for some animations/etc.
Sane defaults: it should be sufficient to drop 'egg:Inupy' into a pipeline and have it Just Work. For performance reasons, "expensive" tools should be disabled by default, with the user able to turn them on at runtime.
Gorgeous look and feel like Django Debug Toolbar (one can dream...)