Contact: fumanchu@aminus.org

Log in as guest/dejavu to create tickets

I think I've seen this ORM somewhere before...

Starting with revision [328], you can use Dejavu without any persistent storage by using the RamStorage manager. This is helpful for prototyping, as well as for web and other applications that need a global (but thread-safe!) cache until the process exits.

Because there are no real options, setting up a RAM cache is quite simple:

import dejavu

class Thing(dejavu.Unit):
    Value = dejavu.UnitProperty(float)

arena = dejavu.Arena()
store = arena.add_store('demo', "dejavu.storage.storeram.RAMStorage")

for cls in arena.register_all(globals()):
    arena.create_storage(cls)

This is all you need to create and safely share Thing objects; in this example, they have ID and Value properties.

Best of all, by using the RamStorage manager from Dejavu, you have an easy upgrade path if (when?) you find you need a DB after all.