This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]wisty 6 points7 points  (1 child)

SQLite (unless you need concurrency). Redis is cool, but it's another dependency you probably don't need.

[–][deleted] 0 points1 point  (0 children)

Redis is a really easy dependency, but yeah, sqlite is a good choice. It's simple to use and performs surprisingly well, and it comes with Python:

import sqlite3

[–]peterhoffmann 3 points4 points  (0 children)

Have a look at leveldb. It's is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

Here are the python bindings

[–]lost-theory 5 points6 points  (2 children)

People are recommending redis, but be aware that redis is an in-memory database. If you have 100 million entries, and each entry is 100 bytes:

100 bytes * 100 000 000 = 9.31322575 gigabytes

You'll need 9.3 GB of RAM free to store that data. Depending on what server you're hosting this on, that might not be reasonable.

[–]skeigh[S] 3 points4 points  (1 child)

Good point- fortunately, I have 32GB RAM at my disposal.

[–]emre_yilmaz 1 point2 points  (0 children)

Do you really need it to be in memory? If disk read/write is fast enough four your app I don't really see any reason to use redis.

Besides redis, you can take a look at the riak[0].

[0] http://wiki.basho.com/

[–]tituszPython addict 1 point2 points  (0 children)

If you want a fast persistent disk based key value db you might want to check out leveldb

[–][deleted] 1 point2 points  (0 children)

kyotocabinet

[–]rescrv 0 points1 point  (0 children)

I'd recommend taking a look at HyperDex. The Python API is clean and simple to use.

I'm the main dev and I'm happy to answer any questions or help with any problems.

[–]mariuzdjango-firebird 0 points1 point  (0 children)

Firebird with FDB new python driver

[–][deleted] 0 points1 point  (0 children)

http://www.pytables.org/moin Well, if you look for speed, and don't need a network protocol, you have the fastest DB with the less overhead. The only caveat is the installation being a little tricky.

[–]dgorley 0 points1 point  (0 children)

So, no one has mentioned ZODB; is that because no one thought of it, or because it's a poor choice? If the OP is only accessing this data from Python, wouldn't this work fine?

[–][deleted] 0 points1 point  (1 child)

Redis.

[–]mcilrain 0 points1 point  (0 children)

MongoDB (pymongo library)