(currently incomplete -- moving this information from other sources)
Using SchevoWsgi
The "SchevoWsgi" package provides an ability to expose one or more databases to a WSGI environment by way of a Paste filter called dbopener.
SchevoWsgi is usually preferred since it lets you use the same Schevo database in more than one WSGI application if you've composited them together.
To use it with a Pylons app, first edit your setup.py file and add "SchevoWsgi==dev" to your install_requires list.
Next, edit your development.ini file. Add these two sections below [DEFAULT], where yourapp is the unique name of your application:
[pipeline:main]
pipeline = dbopener yourapp
[filter:dbopener]
use = egg:SchevoWsgi#dbopener
schevo.db.db = %(here)s/dev.db
verbose = true
Change the [app:main] section name to [app:yourapp], to disambiguate it from the pipeline whose name is main.
Now, provided you have a dev.db Schevo database in the same directory as your development.ini file, it will open it when you serve up the development.ini application.
It is useful to expose the open database more easily by referring to self.db in controller code. To enable this, open yourapp/lib/base.py and add this line above the return statement in the BaseController.__call__ method:
self.db = environ['schevo.db.db']
Without using SchevoWsgi
Edit your development.ini file. In the [app:main] section, add the following line:
schevo.db = %(here)s/dev.db
In your models/__init__.py file, open the database:
from paste.deploy.config import CONFIG
from schevo import database
db = database.open(CONFIG['app_conf']['schevo.db'])
You can now access the open Schevo database as model.db in your controller code.
I'm using such setup without SchevoWsgi:
Add this line to development.ini
and then, in models/_init_.py:
Schevo DB instance is accessible as model.db in controllers.