Skip to main content

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.1.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

sqlpickle-0.1.1-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file sqlpickle-0.1.1.tar.gz.

File metadata

  • Download URL: sqlpickle-0.1.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.6.0

File hashes

Hashes for sqlpickle-0.1.1.tar.gz
Algorithm Hash digest
SHA256 51ed6809ddb56c54ce085405f6744e11802d24fff2a351dc7c4d286eeef1306c
MD5 107f9e8aaf04466a6a9d9d64f7792b50
BLAKE2b-256 38b8c21194e28f12b2170a6e62a05498c31cf170427bd500cdd4767c89735b1d

See more details on using hashes here.

File details

Details for the file sqlpickle-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sqlpickle-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.0 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

Hashes for sqlpickle-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eea5af35792e88de5067353d723aa11c41ea905428458b51c4cd79bfb701dd42
MD5 51b6bb63e7799e2244bb8b4ec3aed354
BLAKE2b-256 2656f8550ee1a8db0279fc762e9797adebcf988158826e20c6c41fd6ec69d2c5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page