- Notifications
You must be signed in to change notification settings - Fork11
msiemens/tinydb-smartcache
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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.
$ pip install tinydb_smartcache
>>>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
- Add support for TinyDB v4. Drops support for TinyDB <= 3 and Python 2.
- Make
SmartCacheTablework again after breakage with TinyDB v3.12.0
- Account for changes in TinyDB 3.0
- Fix installation via pip
- Initial release on PyPI
About
A smarter cache for TinyDB
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.