PyDbLite is a pure-Python in-memory database engine, using Python list comprehensions as query language, instead of SQL

It consists of one small module, PyDbLite.py. The package also provides two modules, SQLite.py and MySQL.py. They use SQLite and MySQL backends with the same Pythonic syntax as the pure-Python PyDbLite engine

To install the package, just download it and install it by running >python setup.py install

Pure-Python engine

SQLite adapter

The only difference with the pure-Python module is the syntax to identify a Base and the need to specify field types on base creation

For record insertion, selection, update and deletion, the syntax is the same as above. The only difference is that you can't use the drop_field() method, since dropping fields is not supported by SQLite

The Base instance has an attribute cursor, so you can also execute SQL expressions by db.cursor.execute(some_sql) and get the result by results = db.cursor.fetchall()

MySQL adapter

The only difference with the pure-Python module is the syntax to identify a Base and the need to specify field types on base creation

For record insertion, selection, update and deletion, adding or dropping fields, the syntax is the same as above

The Base instance has an attribute cursor, so you can also execute SQL expressions by db.cursor.execute(some_sql) and get the result by results = db.cursor.fetchall()