tinydb
TinyDB is a tiny, document oriented database optimized for your happiness :)
Decision gist · record as of 2026-08-14
Yes, if you're building a small application or tool that needs local document storage without external dependencies. The zero-dependency design, simple API, and active maintenance make it a solid choice for prototypes, scripts, and small projects. Not suitable for applications requiring concurrent writes, complex transactions, or large-scale data—use a proper database for those cases.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; does not support Python 3.9 or earlier.
- Installation is frictionless: the package is pure Python with zero runtime dependencies and ships as a single wheel.
- Maintenance is active with recent releases, though the project is in maintenance mode—bugfixes and community contributions are still accepted.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute TinyDB freely in commercial and private projects with minimal restrictions.
last release 2026-08-06 (8 days) · last repo commit 2026-08-10 · 7,551 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,942,135 downloads/mo, #1,805 on PyPI
Alternatives
Verify before relying
pip install tinydb
from tinydb import TinyDB, Query
db = TinyDB('/path/to/db.json')
db.insert({'name': 'John', 'age': 22})
User = Query()
results = db.search(User.name == 'John')- Concurrent write safety and locking behavior under simultaneous access patterns.
- Performance characteristics and scalability limits for datasets beyond typical small-app sizes.
- Storage backend options beyond the default JSON file storage mentioned in the description.
What it is and what it does
TinyDB is a document-oriented database written entirely in Python, designed for small applications that would be overkill for a full SQL database or external server. It stores documents as Python dictionaries in JSON files on disk, with no external dependencies or server process required. The API is intentionally simple: you insert dictionaries, query them using a fluent query language with logical operators, and organize data into named tables. It supports middlewares for customization (like caching) and is extensible through custom storage backends.
The package targets developers building small tools, scripts, or applications where a lightweight local database suffices. It has been actively maintained since 2013, supports Python 3.10 through 3.14 and PyPy3, and includes comprehensive test coverage. The project is now in maintenance mode, meaning new architectural features are unlikely, but bugfixes and community contributions continue.
Use it for
- Store configuration or state for a small CLI tool or desktop application without setting up a database server.
- Persist user data (preferences, cache, local records) in a single-file format that's human-readable and portable.
- Build a quick prototype or MVP that needs structured data storage without the overhead of SQL or MongoDB.
- Write integration tests that need a temporary, isolated database without external dependencies.
- Manage a simple document collection (logs, events, metadata) for a standalone script or microservice.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you're building a small application or tool that needs local document storage without external dependencies.
The zero-dependency design, simple API, and active maintenance make it a solid choice for prototypes, scripts, and small projects. Not suitable for applications requiring concurrent writes, complex transactions, or large-scale data—use a proper database for those cases.
Install
tinydb on PyPI
Before you install
Installation is frictionless: the package is pure Python with zero runtime dependencies and ships as a single wheel. Maintenance is active with recent releases, though the project is in maintenance mode—bugfixes and community contributions are still accepted.
Requires Python 3.10 or later; does not support Python 3.9 or earlier.
License in practice
MIT license is permissive; you can use, modify, and distribute TinyDB freely in commercial and private projects with minimal restrictions.
Quickstart
pip install tinydb
from tinydb import TinyDB, Query
db = TinyDB('/path/to/db.json')
db.insert({'name': 'John', 'age': 22})
User = Query()
results = db.search(User.name == 'John')
Verify before relying
- Concurrent write safety and locking behavior under simultaneous access patterns.
- Performance characteristics and scalability limits for datasets beyond typical small-app sizes.
- Storage backend options beyond the default JSON file storage mentioned in the description.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,942,135 / month, #1,805 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: DatabaseTopic :: Database :: Database Engines/ServersTopic :: UtilitiesTyping :: Typed |
Evidence: tinydb-4.9.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “lightweight json document database”
- tinydbTinyDB is a lightweight, pure-Python document database that stores…
- lfxLFX is a lightweight command-line tool that executes Langflow AI…
- azure-cosmosPython client library for Azure Cosmos DB SQL API that manages…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also plyvel · lmdb · ZODB · json-flatten · nocodb-simple-client · pymongo · Flask-PyMongo · dynamodb-json · python-toon · happybase