Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A smarter cache for TinyDB

License

NotificationsYou must be signed in to change notification settings

msiemens/tinydb-smartcache

Repository files navigation

Build StatusCoverageVersion

tinydb-smartcache provides a smart query cache for TinyDB. It updates thequery cache when inserting/removing/updating elements so the cache doesn't getinvalidated. It's useful if you perform lots of queries while the data changesonly a little.

Installation

$ pip install tinydb_smartcache

Usage

>>>fromtinydbimportTinyDB>>>fromtinydb_smartcacheimportSmartCacheTable>>>db=TinyDB('db.json')>>>db.table_class=SmartCacheTable>>>db.table('foo')>>># foo will now use the smart query cache

If you want to enable TinyDB for all databases in a session, run:

>>>fromtinydbimportTinyDB>>>fromtinydb_smartcacheimportSmartCacheTable>>>TinyDB.table_class=SmartCacheTable>>># All databases/tables will now use the smart query cache

Changelog

v2.0.0 (2020-08-25)

  • Add support for TinyDB v4. Drops support for TinyDB <= 3 and Python 2.

v1.0.3 (2019-10-26)

  • MakeSmartCacheTable work again after breakage with TinyDB v3.12.0

v1.0.2 (2015-11-17)

  • Account for changes in TinyDB 3.0

v1.0.1 (2015-11-17)

  • Fix installation via pip

v1.0.0 (2015-09-17)

  • Initial release on PyPI

About

A smarter cache for TinyDB

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp