fatuhoku
fatuhoku

Reputation: 4911

Is there a ZODB Storage class implementation that runs entirely in memory?

ZODB lets users swap storage backends through the Storage class. Some implementations included with the package includes FileStorage (store your data in a big file) and ClientStorage (store all your data over the network onto a ZODB/ZEO server-of-sorts).

In order to test-drive my development against ZODB I would like to run my tests with an in-memory ZODB: is there a InMemoryStorage or some such?

I found this thread alluding to some successful implementation of FileStorage based on StringIO but I'm afraid my Python-foo mightn't be good enough to quickly hack up a reliable backend.

Upvotes: 0

Views: 189

Answers (1)

fatuhoku
fatuhoku

Reputation: 4911

Well, it was in the docs all along. They're called DemoStorage and MappedStorage.

I couldn't find it at first because its Google rankings were so low!

I post this for posterity...

Upvotes: 2

Related Questions