[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10421":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":19,"lastSyncTime":34,"discoverSource":35},10421,"tinydb","msiemens\u002Ftinydb","msiemens","TinyDB is a lightweight document oriented database optimized for your happiness :)","https:\u002F\u002Ftinydb.readthedocs.org",null,"Python",7526,611,102,7,0,6,24,2,69.76,"MIT License",false,"master",true,[26,27,28,29,30],"database","documentdb","json","nosql","python","2026-06-12 04:00:50",".. image:: https:\u002F\u002Fraw.githubusercontent.com\u002Fmsiemens\u002Ftinydb\u002Fmaster\u002Fartwork\u002Flogo.png\n    :height: 150px\n\n|Build Status| |Coverage| |Version|\n\nQuick Links\n***********\n\n- `Example Code`_\n- `Supported Python Versions`_\n- `Documentation \u003Chttp:\u002F\u002Ftinydb.readthedocs.org\u002F>`_\n- `Changelog \u003Chttps:\u002F\u002Ftinydb.readthedocs.io\u002Fen\u002Flatest\u002Fchangelog.html>`_\n- `Extensions \u003Chttps:\u002F\u002Ftinydb.readthedocs.io\u002Fen\u002Flatest\u002Fextensions.html>`_\n- `Contributing`_\n\nIntroduction\n************\n\nTinyDB is a lightweight document oriented database optimized for your happiness :)\nIt's written in pure Python and has no external dependencies. The target are\nsmall apps that would be blown away by a SQL-DB or an external database server.\n\nTinyDB is:\n\n- **tiny:** The current source code has 1800 lines of code (with about 40%\n  documentation) and 1600 lines tests.\n\n- **document oriented:** Like MongoDB_, you can store any document\n  (represented as ``dict``) in TinyDB.\n\n- **optimized for your happiness:** TinyDB is designed to be simple and\n  fun to use by providing a simple and clean API.\n\n- **written in pure Python:** TinyDB neither needs an external server (as\n  e.g. `PyMongo \u003Chttps:\u002F\u002Fpymongo.readthedocs.io\u002Fen\u002Fstable\u002F>`_) nor any dependencies\n  from PyPI.\n\n- **works on Python 3.8+ and PyPy3:** TinyDB works on all modern versions of Python\n  and PyPy.\n\n- **powerfully extensible:** You can easily extend TinyDB by writing new\n  storages or modify the behaviour of storages with Middlewares.\n\n- **100% test coverage:** No explanation needed.\n\nTo dive straight into all the details, head over to the `TinyDB docs\n\u003Chttps:\u002F\u002Ftinydb.readthedocs.io\u002F>`_. You can also discuss everything related\nto TinyDB like general development, extensions or showcase your TinyDB-based\nprojects on the `discussion forum \u003Chttp:\u002F\u002Fforum.m-siemens.de\u002F.>`_.\n\nSupported Python Versions\n*************************\n\nTinyDB has been tested with Python 3.8 - 3.13 and PyPy3.\n\nProject Status\n**************\n\nThis project is in maintenance mode. It has reached a mature, stable state\nwhere significant new features or architectural changes are not planned. That\nsaid, there will still be releases for bugfixes or features contributed by\nthe community. Read more about what this means in particular\n`here \u003Chttps:\u002F\u002Fgithub.com\u002Fmsiemens\u002Ftinydb\u002Fdiscussions\u002F572>`_.\n\nExample Code\n************\n\n.. code-block:: python\n\n    >>> from tinydb import TinyDB, Query\n    >>> db = TinyDB('\u002Fpath\u002Fto\u002Fdb.json')\n    >>> db.insert({'int': 1, 'char': 'a'})\n    >>> db.insert({'int': 1, 'char': 'b'})\n\nQuery Language\n==============\n\n.. code-block:: python\n\n    >>> User = Query()\n    >>> # Search for a field value\n    >>> db.search(User.name == 'John')\n    [{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}]\n\n    >>> # Combine two queries with logical and\n    >>> db.search((User.name == 'John') & (User.age \u003C= 30))\n    [{'name': 'John', 'age': 22}]\n\n    >>> # Combine two queries with logical or\n    >>> db.search((User.name == 'John') | (User.name == 'Bob'))\n    [{'name': 'John', 'age': 22}, {'name': 'John', 'age': 37}, {'name': 'Bob', 'age': 42}]\n\n    >>> # Negate a query with logical not\n    >>> db.search(~(User.name == 'John'))\n    [{'name': 'Megan', 'age': 27}, {'name': 'Bob', 'age': 42}]\n\n    >>> # Apply transformation to field with `map`\n    >>> db.search((User.age.map(lambda x: x + x) == 44))\n    >>> [{'name': 'John', 'age': 22}]\n\n    >>> # More possible comparisons:  !=  \u003C  >  \u003C=  >=\n    >>> # More possible checks: where(...).matches(regex), where(...).test(your_test_func)\n\nTables\n======\n\n.. code-block:: python\n\n    >>> table = db.table('name')\n    >>> table.insert({'value': True})\n    >>> table.all()\n    [{'value': True}]\n\nUsing Middlewares\n=================\n\n.. code-block:: python\n\n    >>> from tinydb.storages import JSONStorage\n    >>> from tinydb.middlewares import CachingMiddleware\n    >>> db = TinyDB('\u002Fpath\u002Fto\u002Fdb.json', storage=CachingMiddleware(JSONStorage))\n\n\nContributing\n************\n\nWhether reporting bugs, discussing improvements and new ideas or writing\nextensions: Contributions to TinyDB are welcome! Here's how to get started:\n\n1. Check for open issues or open a fresh issue to start a discussion around\n   a feature idea or a bug\n2. Fork `the repository \u003Chttps:\u002F\u002Fgithub.com\u002Fmsiemens\u002Ftinydb\u002F>`_ on Github,\n   create a new branch off the `master` branch and start making your changes\n   (known as `GitHub Flow \u003Chttps:\u002F\u002Fdocs.github.com\u002Fen\u002Fget-started\u002Fusing-github\u002Fgithub-flow>`_)\n3. Write a test which shows that the bug was fixed or that the feature works\n   as expected\n4. Send a pull request and bug the maintainer until it gets merged and\n   published ☺\n\n.. |Build Status| image:: https:\u002F\u002Fimg.shields.io\u002Fazure-devops\u002Fbuild\u002Fmsiemens\u002F3e5baa75-12ec-43ac-9728-89823ee8c7e2\u002F2.svg?style=flat-square\n   :target: https:\u002F\u002Fdev.azure.com\u002Fmsiemens\u002Fgithub\u002F_build?definitionId=2\n.. |Coverage| image:: http:\u002F\u002Fimg.shields.io\u002Fcoveralls\u002Fmsiemens\u002Ftinydb.svg?style=flat-square\n   :target: https:\u002F\u002Fcoveralls.io\u002Fr\u002Fmsiemens\u002Ftinydb\n.. |Version| image:: http:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Ftinydb.svg?style=flat-square\n   :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Ftinydb\u002F\n.. _Buzhug: http:\u002F\u002Fbuzhug.sourceforge.net\u002F\n.. _CodernityDB: https:\u002F\u002Fgithub.com\u002Fperchouli\u002Fcodernitydb\n.. _MongoDB: http:\u002F\u002Fmongodb.org\u002F\n","TinyDB 是一个轻量级的面向文档数据库，旨在为小型应用提供简单快乐的数据存储体验。它完全用 Python 编写，无需外部依赖，支持以字典形式存储任何文档数据。项目特点包括小巧（源代码约1800行）、文档导向、易于使用且具备强大的扩展性，允许通过编写新的存储方式或中间件来定制行为。适用于那些不需要复杂SQL数据库或外部数据库服务器的小型应用程序场景，特别适合Python 3.8及以上版本和PyPy3环境下的快速开发。","2026-06-11 03:28:19","top_topic"]