5 ms·
I'm working on a document-oriented database engine written purely in Python: BlitzDB! https://github.com/adewes/blitzdb https://github.com/adewes/blitzdb My m
by ThePhysicist 12y ago
I'm working on a document-oriented database engine written purely in Python: BlitzDB!
https://github.com/adewes/blitzdb https://github.com/adewes/blitzdb
My motivation was that I needed (wanted?) a pure-Python document database that does not have any dependencies (like pymongo) and provides querying capabilities similar to MongoDB.
Currently, Blitz is under active development and comes with a file-based backend as well as a MongoDB backend.
Contributions to the codebase and feedback are highly welcome :)
The issue tracker contains various suggestions for contributions, with various difficulty levels:
https://github.com/adewes/blitzdb/issues https://github.com/adewes/blitzdb/issues
- cabalamat 12y agoWhen this is used with a mongoDB backend, how much slower is it than just using pymongo?
- ThePhysicist 12y agoIt depends ;) It's a very thin wrapper around MongoDB, so normally the performance penalty should not be too large. The biggest slowdown will come from inspecting a document class to see if other document classes are contained within it (which will be replaced by DB references).
- chrismorgan 12y agoHave you heard of ZODB? You might find it interesting to look at—perhaps you might even find it does all you want, and more.
- ThePhysicist 12y agoYeah I know ZODB, but it's not what I want for several reasons: -Requires C extensions to run (makes it complicated to install on other systems) -Does not provide advanced querying capabilities (to my knowledge) -Does not have transparent references and lazy loading (to my knowledge) -Does not interoperate with MongoDB and other DB systems (to my knowledge) The nice thing about Blitz is that it allows me to switch from a file-based backend to MongoDB (and SQL in the future) without changing any of my code, and I can write stuff like this: al_pacino = backend.get(Actor,{'name' : 'Al Pacino'}) robert_de_niro = backend.get(Actor,{'name' : 'Robert de Niro'}) joint_movies = backend.filter(Movie,{'cast' : {'$all' : [al_pacino,robert_de_niro]}})
- webmaven 12y agoI can debunk two of these right off the bat: Requires C extensions to run - Nope, there are pure-Python implementations as well. Does not provide advanced querying capabilities - Nope, https://pypi.python.org/pypi/zope.index https://pypi.python.org/pypi/zope.index, https://pypi.python.org/pypi/zope.app.catalog https://pypi.python.org/pypi/zope.app.catalog, http://docs.repoze.org/catalog/ http://docs.repoze.org/catalog/
- ThePhysicist 12y agoThanks for the clarification, ZODB sure is a very interesting project!
- mahmoudimus 12y agoSeconding ZODB