tinydb-smartcache
tinydb-smartcache provides a smart query cache for TinyDB. It updates the query cache when inserting/removing/updating elements so the cache doesn’t get invalidated. It’s useful if you perform lots of queries while the data changes only a little.
Installation
$ pip install tinydb_smartcache
Usage
>>> from tinydb import TinyDB
>>> from tinydb_smartcache import SmartCacheTable
>>> 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:
>>> from tinydb import TinyDB
>>> from tinydb_smartcache import SmartCacheTable
>>> 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)
Make SmartCacheTable 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
Metadata
Release files for tinydb-smartcache 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tinydb-smartcache-2.0.0.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tinydb_smartcache-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / tinydb-smartcache-2.0.0.tar.gz
| Download URL | tinydb-smartcache-2.0.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1f6034d8fe28a72810fdbef46a0547949cbf7e9b43a69343dc0e1adfb47f04a
|
|
BLAKE2b-256 checksum How to use checksums |
c36d5fd031f52892f834856a1f019d7c15a5981b82385427a5e164da3711b946
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Linux/5.3.0-1034-azure
|
Release files / tinydb_smartcache-2.0.0-py3-none-any.whl
| Download URL | tinydb_smartcache-2.0.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c162fe6c558bb73ff1e6b33b168807ea87063e47e2b85cb9e84c12d4354aa7c8
|
|
BLAKE2b-256 checksum How to use checksums |
08c42190b0c9a5ed5f9791df94ccc4596982bad46842356af67144597d65db06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Linux/5.3.0-1034-azure
|