Yelp/sqlite3dbm — pull request #4 by mtai (2011-11-09 22:26:34+00:00)
Title: Adding multi-map support to a single SQLiteDB

This might be outside the scope of what sqlite3dbm is trying to accomplish but is something that might be useful nonetheless. Instead of having to have N dbs for N tables, we can now have a single db support N tables. Try this out in ipython

import sqlite3dbm.dbm

# New method
map_container = sqlite3dbm.dbm.open_container('hello.db', flag='c')

# Auto-create table on the fly
number_map = map_container.number_map
number_map['12345'] = '6789'

# Auto-create table on the fly again
letter_map = map_container.letter_map
letter_map['abcd'] = 'efgh'

print number_map.items()
print letter_map.items()
print hello.mapnames()

I added a test and changed CHANGES.txt / AUTHORS.txt but didn't update the docs. I would like this available for everyone to use but would like to hear if/how this should be integrated.