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

Uploaded Source

Built Distribution

sqlpickle-0.1.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sqlpickle-0.1.0.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

Hashes for sqlpickle-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5420d91f27b59561508029cf35943bd9734f8b7cbc511b07b5461545e741ffc1
MD5 dab1258afc53c47e93c4a6de485d0a1c
BLAKE2b-256 5eeb53aefd9b4d2af8acc5ab41d52b332a5fbf5bdb0e0a40fe6d7a5074946c2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sqlpickle-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bae2882d1c7ef5f66d9c00160a414d6d708c7606cae9d1533524a0596804431b
MD5 0f9618b3d57606eab34d9b6718b2e963
BLAKE2b-256 972eb83c3c85233d1c09129557465a3e2028d85c520a59ff81db351cc043e544

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