TinyDB
TinyDB is a free, MIT-licensed document-oriented database written in pure Python, with no external dependencies.
What TinyDB is
TinyDB is a free, MIT-licensed document-oriented database written in pure Python, with no external dependencies. It is designed for small applications that would be poorly served by SQL or an external database server. Data is stored in JSON files by default, with in-memory storage also available. The API supports inserting, searching, updating, and removing documents, while queries can use comparisons, regular expressions, custom tests, nested fields, and logical combinations. Tables organize documents within a database. Middleware lets developers add storage types or alter storage behavior, and listed extensions include asyncio compatibility, object serialization, and a smart query cache. TinyDB is self-hosted, and the current release requires Python 3.10 or later. The project is in maintenance mode, so significant new features and architectural changes are not planned, though bug fixes and community contributions may appear. Documentation advises against workloads requiring multi-process or multi-thread access, indexes, an HTTP server, relationships, ACID guarantees, or high performance. TinyDB has no transactions.
Good
- Pure Python with no dependencies
- JSON and in-memory storage
- Flexible document queries
- Middleware supports custom storage
- MIT-licensed and free
Watch out
- No transactions
- Not suited to multi-process access
- No indexes or relationships
- Requires Python 3.10 or later
Who it suits
It suits developers building small Python applications that need a simple document store without a database server. It is less suitable for concurrent, relational, transactional, or high-performance workloads.
Verdict
TinyDB keeps document storage simple for small Python applications and offers useful query and extension options. Its documented concurrency, transaction, indexing, and performance limits define where it should be used.
The facts
Each one read from TinyDB's own pages, with the date it was checked.
What it does
- Data operations
- Its API supports inserting, searching, updating, and removing documents.checked 9 Oct 2026
- Extensibility
- Users can add custom storage implementations and middleware.checked 9 Oct 2026
- Extensions
- The documentation lists community extensions including aiotinydb, tinydb-rust, and tinyrecord.checked 9 Oct 2026
- Installation
- The documentation says to install TinyDB from PyPI with `pip install tinydb`.checked 4 Oct 2026
- Intended use
- TinyDB is aimed at small apps that would be poorly served by a SQL database or an external database server.checked 4 Oct 2026
- Language and dependencies
- TinyDB is written in pure Python and has no external dependencies.checked 9 Oct 2026
- License
- The project metadata identifies the license as MIT.checked 4 Oct 2026
- Limitations
- The documentation advises against TinyDB when an application needs multi-process or multi-thread access, table indexes, an HTTP server, relationships, ACID guarantees, or high performance.checked 9 Oct 2026
- Maintenance
- TinyDB is in maintenance mode, with no significant new features or architectural changes planned, though bug fixes and community-contributed features may be released.checked 9 Oct 2026
- Notable limits
- The documentation advises against TinyDB when an application needs multi-process or multi-thread access, indexes, an HTTP server, table relationships, ACID guarantees, or high performance.checked 4 Oct 2026
- Purpose
- TinyDB is a lightweight, document-oriented database intended for small apps that would be poorly served by a SQL database or external database server.checked 9 Oct 2026
- Python support
- The project says it has been tested with Python 3.8 through 3.13 and PyPy3.checked 9 Oct 2026
- Queries
- Queries support comparisons, regular expressions, custom tests, nested fields, and logical combinations.checked 9 Oct 2026
- Security
- The security policy asks vulnerability reporters to use GitHub’s private vulnerability reporting feature and says it aims to respond within seven days.checked 4 Oct 2026
- Security limits
- The security policy says TinyDB is not designed for adversarial multi-tenant environments and recommends validating data before storage.checked 4 Oct 2026
- Security note
- The documentation warns that callable query predicates execute in-process and must not come from untrusted or user-controlled input.checked 9 Oct 2026
- Storage
- By default, TinyDB stores data on disk in JSON format.checked 9 Oct 2026
- Tables
- TinyDB supports tables for organizing documents within a database.checked 9 Oct 2026
- What it is
- TinyDB is a tiny, document-oriented database written in pure Python.checked 4 Oct 2026
Alternatives to TinyDB
- 1

JayDB
Free planOpen sourceAndroidiOSWebAPI8.4Free plan - 2

Firestore
Free planAndroidiOSWebAPI8.1$0.03 usage-based - 3

RethinkDB
Free planOpen sourceWebAPILinuxmacOS7.4Free plan - 4
restdb.io
Free planAndroidiOSWebAPI7.2From $19 a month - 5

Amazon DocumentDB
WebAPI7.1 - 6
UnQLite
Free planAPILinuxmacOSSelf-hosted7.0From $15,000 a year
