Skip to main content

A small, fast, in-memory database management program

The database object supports the iterator protocol, so that requests can be expressed with list comprehensions or generator expressions instead of SQL. The equivalent of :

cursor.execute(“SELECT name FROM table WHERE age=30”)

rows = cursor.fetchall()

is :

rows = [ row[“name”] for row in table if row[“age”] == 30 ]

The module stores data in a cPickled file. Records are indexed by a unique record identifier, that can be used for direct access. Since operations are processed in memory they are extremely fast, nearly as fast as SQLite in the few tests I made. An index can be created on a field to speed up selections

Metadata

Release history Release notifications | RSS feed

2.5

2.3

2.0

This release

1.9 This release

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page