I've checked out the important thing-value database Redis and am interested in options that will provide the following:
Rather than beginning an exterior database engine like a separate process, after which hooking up into it, e.g. through the C interface:
redisContext *c = redisConnect("127.0.0.1", 6379);
Can there be an alternate that provides a choice of such as the database code like a library, and loading the information like a file within-binary? For instance, because of the binary
myDbBinaryand also the command:
$ myBinary --filter=filterOptions db.dat
myBinarywouldn't begin a separate db process and fasten to the port, but, rather,
myBinaryloads the secrets (and hashes) in the file
db.datinto memory (or similar VM arrangement) so it may then filter (with
filterOptions, whatever they could be) and perform key/hash searches.
C and Python connects to data and storage directives.
Hash support, through which I am talking about a vital keeps a hash table like a value.
Does any software such as this exist?
No, Redis functions as a process, less a library. There's not a way presently of doing this. You should use options like Kyoto Cabinet (that is more redis-like).
Kyoto has hash tables support for C and Python.
Alternatively you should use SQLite but it is quite diverse from that which you requested.
SQLite is definitely an in-process database. It's relational, however, you could construct your simple key-value store inside it. It is also incorporated within the Python standard library.
You could try out littletable. It's a schemaless in-memory "database" that blurs the road between tables and lists. littletable uses no schema, it infers query and join posts in the characteristics from the objects put into confirmed Table. All queries and joins return the outcomes like a new Table (rather than presenting a man-made ResultSet or QuerySet collection), which makes it easy to easily chain various queries, unions, joins, and filters. Fields can be simply indexed and retrieved by index key - when the index is really a unique index, then your single matching object is came back or KeyError is elevated when the index isn't unique, a brand new Table from the objects using the given secret is came back (which might be empty). Tables also support many list-ant characteristics, for example iter and len, and can be used a typical Python collection set for loops and generator expressions.
littletable features a generic DataObject class, that is much like namedtuple. But objects regardless of the sort could be placed right into a littletable Table.
Obtain the latest version from SVN: https://littletable.svn.sourceforge.net/svnroot/littletable