From a44ea7f5dc9e8b078e46e276e8fa977fddaab649 Mon Sep 17 00:00:00 2001 From: Isra Mekki <98828872+IsraMekki0@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:28:02 +0200 Subject: [PATCH] Slight improvement of readme --- Readme.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 2015fd4..581bae7 100644 --- a/Readme.md +++ b/Readme.md @@ -21,18 +21,24 @@ pip install effidict ``` ## Usage +Importing the package ``` from effidict import LRUDBDict, LRUDict, DBDict +``` -# Using LRUDict +Using `LRUDict` for persistent storage on `pickle` files +``` cache_dict = LRUDict(max_in_memory=100, storage_path="cache") cache_dict['key'] = 'value' +``` -# Using LRUDBDict for persistent storage +Using `LRUDBDict` for persistent storage on `sqlite` +``` db_cache_dict = LRUDBDict(max_in_memory=100, storage_path="cache.db") db_cache_dict['key'] = 'value' - -# Standard DBDict +``` +Standard `DBDict` (`sqlite` only) +``` db_dict = DBDict(storage_path="cache.db") db_dict['key'] = 'value' ```