Simple file-based cache for Python objects.
Project description
varcache
A simple library that provides a way to store and synchronize Python objects on a disk. It can be a good alternative towards SQLite or other solutions that seem to be too complicated in your project. Inside varcache uses pickle.
Installation
pip install varcache
Basic example
from varcache import Varcache
# Configure the drectory to save
vcache = Varcache(dirpath='./storage')
# Load and save example
obj1 = vcache.load(name='obj1', default=dict)
obj1['x'] = 25
vcache.save(obj1)
# Binding example
obj2 = []
vcache.bind(obj2, name='obj2')
obj2.append(36)
vcache.save(obj2)
# Plain save
obj3 = {2, 3, 5, 7}
vcache.save(obj3, name='obj3')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
varcache-0.2.0.tar.gz
(3.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file varcache-0.2.0.tar.gz.
File metadata
- Download URL: varcache-0.2.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c4c90ef20117beae92ce186c4fe881c2f03fc52b012c750bb01d3a841d67977
|
|
| MD5 |
198d8c212314e9621e69ae1007c6f3b6
|
|
| BLAKE2b-256 |
568997fd52101e3bf7d9319bad349f13bb6e30631abfe7240c143b35eb0ac11c
|
File details
Details for the file varcache-0.2.0-py3-none-any.whl.
File metadata
- Download URL: varcache-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00fb96080484444beb577d62477c9f65ab196d7d8651b8f9f29c40cd38033bf0
|
|
| MD5 |
09de8c94af384dd7ce4f8ace7db06bf4
|
|
| BLAKE2b-256 |
27644458664641704632b1798ccbe2cd529e99576542a1eead225a1b78ce1394
|