Simple KV Storage and memoization based on sqlite
Project description
SQL Pickle
SQL Pickle is a simple key-value store that uses SQLite to store pickled objects.
from sqlpickle import KeyValueStore
store = KeyValueStore('test.db')
store['test'] = 1
print(store['test'])
# 1
store['very_complex_object'] = {'a': 1, 'b': 2}
Memoization
from sqlpickle import memoize, KeyValueStore
@memoize(KeyValueStore('test.db'))
def expensive_function(x):
return x**2
expensive_function(2) # 4
expensive_function(2) # 4
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sqlpickle-0.1.2.tar.gz
(1.7 kB
view details)
Built Distribution
File details
Details for the file sqlpickle-0.1.2.tar.gz
.
File metadata
- Download URL: sqlpickle-0.1.2.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d01a09993a322a196e4dfe24ff9d5ecef63d9a1e8bee74bf48e585f0b3c4625d |
|
MD5 | 2306333bfbd8bd8ab582b3314debaeac |
|
BLAKE2b-256 | 54091ec9e2b0498f602666df5a6065074a1bd33068be02d22a3272ac0f343ed0 |
File details
Details for the file sqlpickle-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: sqlpickle-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f4a5eef0a22281bda49dfc90de5ba5d2f6c5e7bc25d8cb774f747e84f46de5e |
|
MD5 | 7c62e1f21adc861d001f3cee062a2f2f |
|
BLAKE2b-256 | f9dd58f185f7c2dc789e126901e8c1811b20b946bea41772dccd7a4938634f0a |