HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
adewes
blitzdb
Python2014–2018
adewes / blitzdb

blitzdb

Blitz is a document-oriented database for Python that is backend-agnostic. It comes with a flat-file database for JSON documents and provides MongoDB-like querying capabilities.

3Distinct people
10Mentions
0Explicit recommenders
334GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Blitz is a document-oriented database for Python that is backend-agnostic. It comes with a flat-file database for JSON documents and provides MongoDB-like querying capabilities.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year10 dated mentions

Observed mentions: 2014-04-05 18:08:26 UTC to 2018-11-20 14:03:04 UTC.

012342014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC413
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC303
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101

What Hacker News says

10 sources
I think Hasura takes care of building „good“ SQL queries that retrieve the data in a single request. I agree that it’s often not viable to resort to the standard GraphQL resolvers that will produce n database queries when asking for a list of items with a corresponding joined field. A while ago I built a MongoDB->SQL wrapper that would take a MongoDB query (with arbitrary many nested $include entries) and convert it to a single SQL query, which worked quite well. Of course this didn’t have any logic to check for permissions as we weren’t “crazy” enough to let arbitrary clients formulate the queries (we did it in the backend). The code is available at https://github.com/adewes/blitzdb, we used it with https://github.com/QuantifiedCode/QuantifiedCode.
In Set up a production-ready realtime GraphQL backend
I wrote a similar library -BlitzDB- a while ago: https://github.com/adewes/blitzdb It's a pure Python database engine with a MongoDB-like query engine and support for three different backends: File (native), SQL (via SQLAlchemy) and MongoDB. The library transparently translates a large number of MongoDB queries into SQL or its own native storage backend, and when using the SQL backend it can do things that MongoDB can't, like queries spanning multiple relationships. The latest version is not fully documented yet but I'm using it on several production projects myself. I'm looking for a maintainer and contributors btw, so if you're interested feel free to get in touch with me!
In Show HN: Pydb – a lightweight database with Python syntax queries, using ZeroMQ
I actually built a MongoDB query interface for SQL via Python+SQLAlchemy. It allows you to query your relational database just like you would with MongoDB, and in addition use some things (e.g. Joins in queries or "deep querying") that are not possible using MongoDB. Here's the repo: https://github.com/adewes/blitzdb The implementation is stable but I'm still working on finishing Python3 support and documentation.
In What MongoDB got right
SQLAlchemy really is great. Alembic (the schema migration toolkit) still lacks some functionality compared to e.g. the Django "South" package, especially concerning the handling of cyclic dependencies (where it just "bails out") and some things that are still not correctly implemented for various database backends (such as Enum fields), but apart from that it's a really really great tool. Recently I have used it to implement MongoDB query sntax on SQL which was not only possible using SQLAlchemy but even enjoyable (for those who are interested in running Mongo queries on SQL: https://github.com/adewes/blitzdb -> see feature/sql_backend branch, which is still not 100 % stable though). What makes it especially amazing is that Mike Bayer has written 90 % of the code base by himself (https://github.com/zzzeek/sqlalchemy/graphs/contributors),
Read the rest
which somtimes makes me wonder if he is a real person or just a pseudonym under which a group of talented programmers publish code ;)
In Reasons to love SQLAlchemy
I'm working on a document-oriented database engine written purely in Python: 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
In Ask HN: What projects are you working on?
Putting side effects in the __init__ code seems to become quite fashionable these days but is a pretty bad idea since it removes the possibility to "just" import the functionality defined by the module without performing any initialization. Personally, I always try to avoid having a system that relies on some global configuration (like e.g. Django, Matplotlib or Flask do). In matplotlib for example this causes a lot of problems, since importing the pylab module will automatically (among other things) load and initialize a backend, which is then set in stone for the rest of the session. IMHO, the way to go here instead is dependency injection: Inject the configuration into the module through a function or class method (e.g. Flask.initialize({config state}). Wrapping all module functionality that depends on configuration in a class is a goo
Read the rest
d idea here since it allows you to use multiple configurations in parallel and makes your code more modular. As an example, in BlitzDB (a document-oriented database for Python, https://github.com/adewes/blitzdb) there is no global configuration at all, so you can initialize and use multiple backends in parallel as you please without worrying about side effects. SQLAlchemy does it in a similar way btw.
In Say “no” to import side‐effects in Python

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.