Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Surrealdb | 20,700 | 5 hours ago | 35 | December 14, 2021 | 225 | other | Rust | |||
A scalable, distributed, collaborative, document-graph database, for the realtime web | ||||||||||
Arangodb | 12,977 | 5 hours ago | 240 | May 23, 2018 | 810 | apache-2.0 | C++ | |||
🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions. | ||||||||||
Badger | 12,315 | 754 | 6 hours ago | 48 | August 25, 2021 | 33 | apache-2.0 | Go | ||
Fast key-value DB in Go. | ||||||||||
Tinydb | 5,873 | 559 | 254 | 15 days ago | 66 | February 19, 2022 | 14 | mit | Python | |
TinyDB is a lightweight document oriented database optimized for your happiness :) | ||||||||||
Orientdb | 4,598 | 328 | 54 | 4 days ago | 209 | September 14, 2022 | 266 | apache-2.0 | Java | |
OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries. | ||||||||||
Ravendb | 3,250 | 6 hours ago | 1 | August 04, 2010 | 68 | other | C# | |||
ACID Document Database | ||||||||||
Tiedot | 2,618 | 2 years ago | 26 | bsd-2-clause | Go | |||||
A rudimentary implementation of a basic document (NoSQL) database in Go | ||||||||||
Tbls | 2,335 | 4 | 21 days ago | 31 | May 28, 2022 | 27 | mit | Go | ||
tbls is a CI-Friendly tool for document a database, written in Go. | ||||||||||
Marten | 2,326 | 31 | 56 | 18 hours ago | 185 | September 04, 2022 | 81 | mit | C# | |
.NET Transactional Document DB and Event Store on PostgreSQL | ||||||||||
Terminusdb | 2,315 | 7 hours ago | 187 | apache-2.0 | Prolog | |||||
TerminusDB is a distributed database with a collaboration model |
TinyDB is a lightweight document oriented database optimized for your happiness :) It's written in pure Python and has no external dependencies. The target are small apps that would be blown away by a SQL-DB or an external database server.
TinyDB is:
dict
) in TinyDB.To dive straight into all the details, head over to the TinyDB docs. You can also discuss everything related to TinyDB like general development, extensions or showcase your TinyDB-based projects on the discussion forum.
TinyDB has been tested with Python 3.7 - 3.11 and PyPy3.
>>> from tinydb import TinyDB, Query
>>> db = TinyDB('/path/to/db.json')
>>> db.insert({'int': 1, 'char': 'a'})
>>> db.insert({'int': 1, 'char': 'b'})
>>> User = Query()
>>> # Search for a field value
>>> db.search(User.name == 'John')
[{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}]
>>> # Combine two queries with logical and
>>> db.search((User.name == 'John') & (User.age <= 30))
[{'name': 'John', 'age': 22}]
>>> # Combine two queries with logical or
>>> db.search((User.name == 'John') | (User.name == 'Bob'))
[{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}, {'name': 'Bob', 'age': 42}]
>>> # Apply transformation to field with `map`
>>> db.search((User.age.map(lambda x: x + x) == 44))
>>> [{'name': 'John', 'age': 22}]
>>> # More possible comparisons: != < > <= >=
>>> # More possible checks: where(...).matches(regex), where(...).test(your_test_func)
>>> table = db.table('name')
>>> table.insert({'value': True})
>>> table.all()
[{'value': True}]
>>> from tinydb.storages import JSONStorage
>>> from tinydb.middlewares import CachingMiddleware
>>> db = TinyDB('/path/to/db.json', storage=CachingMiddleware(JSONStorage))
Whether reporting bugs, discussing improvements and new ideas or writing extensions: Contributions to TinyDB are welcome! Here's how to get started: