Gadfly
discontinuedby Aaron Watters · since 1994
Pure-Python SQL relational database from 1994, an early DB-API engine; long unmaintained.
discontinued. Last release 1.0.0 in 2005 and Python 2 only; superseded by Python's built-in sqlite3 module.
Overview
Gadfly is a relational database engine written entirely in Python by Aaron Watters, first released in 1994 and later maintained on SourceForge as GadflyB5. It parses a sizeable subset of SQL with its own kwParsing toolkit, keeps tables and indexes in memory, logs commits to disk for crash recovery, and exposes the Python DB-API so applications could swap it for a server database later. A small TCP server mode let several processes share one database, since concurrent writers were otherwise not supported. Contributors over the years included the Zope Corporation team. The final 1.0.0 release dates from 2005 and targets Python 2; sqlite3 in the standard library has since taken over this niche.
Strengths & trade-offs
Strengths
- +Zero native dependencies: SQL engine written in pure Python
- +DB-API compliant, so code could later move to a server database
- +Log-based recovery of committed transactions after a crash
- +Readable source for learning how a SQL parser and executor fit together
Trade-offs
- −Python 2 only and unmaintained since 2005
- −No concurrent writers without the TCP server
- −Whole database held in memory
- −SQL coverage is a subset
Great for
- +Teaching SQL engine internals
- +Maintaining old Python 2 or Zope code that embeds it
Think twice for
- −New Python projects (use sqlite3 or DuckDB)
- −Multi-user or large datasets
Capabilities
Native or official first-party support · 5 of 25 tracked
Scale & consistency
- Comfortable data size
- Small · ≤ 100 GB
- Horizontal scaling
- None
- Multi-region
- No
- Transactions
- Limited ACID
- Consistency
- Strong
- Schema
- Strict
- Architecture
- Embedded, In memory, Client server
- Query languages
- SQL (subset)
The working set lives in memory; sized for small datasets.
Deployment
Ecosystem
Alternatives to Gadfly
The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers.
gadfly vs sqlite →In-process columnar SQL database: the SQLite of analytics, running inside your app or notebook.
gadfly vs duckdb →Pure-Python document store that keeps every table in one human-readable JSON file.
gadfly vs tinydb →Desktop database and forms builder bundled with Microsoft 365; still everywhere in back offices.
gadfly vs microsoft-access →Lightweight, MVCC relational database from the InterBase lineage, embeddable or client-server.
gadfly vs firebird →Long-running pure-Java SQL database with strong SQL:2023 coverage, used embedded and in LibreOffice.
gadfly vs hsqldb →Gadfly FAQ
What is Gadfly?
Gadfly is a relational database by Aaron Watters, first released in 1994. Gadfly is a relational database engine written entirely in Python by Aaron Watters, first released in 1994 and later maintained on SourceForge as GadflyB5. It parses a sizeable subset of SQL with its own kwParsing toolkit, keeps tables and indexes in memory, logs commits to disk for crash recovery, and exposes the Python DB-API so applications could swap it for a server database later. A small TCP server mode let several processes share one database, since concurrent writers were otherwise not supported. Contributors over the years included the Zope Corporation team. The final 1.0.0 release dates from 2005 and targets Python 2; sqlite3 in the standard library has since taken over this niche.
Is Gadfly open source?
Yes. Gadfly is open source. License: Gadfly license (historical permission notice).
Does Gadfly support ACID transactions?
Partly. Gadfly offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong consistency.
Does Gadfly scale horizontally?
Gadfly does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).
How can I run Gadfly?
You can self-host it and embed it in your application.
What is Gadfly best for?
Gadfly is a strong fit for teaching SQL engine internals and maintaining old Python 2 or Zope code that embeds it. Think twice for new Python projects (use sqlite3 or DuckDB).
What are the best alternatives to Gadfly?
Common alternatives to Gadfly include SQLite, DuckDB, TinyDB, Microsoft Access and Firebird. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
Is Gadfly still maintained?
Gadfly is discontinued. Last release 1.0.0 in 2005 and Python 2 only; superseded by Python's built-in sqlite3 module.
How popular is Gadfly?
Gadfly ranks #586 of 844 databases on the WhichDB Score (1.0/100), and #183 among relational databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.


