tinydb

TinyDB is a lightweight document oriented database optimized for your happiness :)

What is tinydb?

TinyDB is a lightweight document oriented database optimized for your happiness :)

Overview of tinydb

What it is

TinyDB is a lightweight document oriented database written in pure Python with no external dependencies. It is designed for small applications that do not require a full SQL database or an external database server. The project is in maintenance mode, meaning it has reached a mature, stable state where significant new features or architectural changes are not planned, but bugfixes and community-contributed features may still be released. TinyDB works on Python 3.8+ and PyPy3.

Key features

  • Document oriented: stores documents as Python dicts, similar to MongoDB.
  • Written in pure Python with no external dependencies.
  • Tiny codebase: approximately 1800 lines of code (with about 40% documentation) and 1600 lines of tests.
  • Provides a simple and clean API.
  • Powerfully extensible: supports custom storages and Middlewares.
  • 100% test coverage.

Use cases

TinyDB is suitable for small apps that would be overwhelmed by a SQL database or an external database server. It can be used for prototyping, small scripts, embedded applications, or any scenario where a lightweight, serverless document store is needed.

Getting started

python >>> from tinydb import TinyDB, Query >>> db = TinyDB('/path/to/db.json') >>> db.insert({'int': 1, 'char': 'a'}) >>> db.insert({'int': 1, 'char': 'b'}) For full documentation, see the repository README.

License and pricing

TinyDB is open source under the MIT license. Pricing is not stated; it is free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/msiemenstinydb.svg)](https://yunodb.com/tools/msiemenstinydb?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/msiemenstinydb?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/msiemenstinydb.svg" alt="Featured on YunoDB" height="20"></a>