Sample code showing how to connect to a DB using sqlalchemy, hash emails, and do lookups/inserts on the hashes
Add unsubscribe list

To setup unsubscribes, configure the database url, then run
$ createdb cryptobot
$ ./unsubscribe --create

To unsubscribe an address
$ ./unsubscribe --add foo@example.com

To un-unsubscribe an address...(TODO)

Unsubscribed emails are salted and hashed before storage. The salt is a
random string generated during database creation, then stored in the
database itself. This makes it harder for the operator to shoot
themselves in the foot, by say, modifying a param in a config file.
Fix undefined Integer
Degrade gracefully if database doesn't exist
refactor database setup a bit
Add some advice
Handle uninitialized ubsubscribe database

Also rename 'create' to 'setup', since the database must have already
been createded using createdb on the command line.
fix undefeined 'string'
todo
Use SystemRandom correctly
It's polite to return the db when someone asks for it
Make db echo optional/debug only

From the command line, ./unsubscribe --debug
Programatically, getDatabase(url, debug=true)
Update 'documentation'
Fix argument name
inline this stuff. it's simple enough.
Add missing return statement

Note to self: this is not ruby.
Get outta here printf