Skip to content

Commit

Permalink
Merge branch 'main' of github.com:HelmholtzAI-Consultants-Munich/Effi…
Browse files Browse the repository at this point in the history
…Dict
  • Loading branch information
IsraMekki0 committed Apr 30, 2024
2 parents c70f64f + a44ea7f commit e9ca8f7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
```
Expand Down

0 comments on commit e9ca8f7

Please sign in to comment.