A lightweight key-value storage toolkit using JSON
Project description
SaveKit
SaveKit is a lightweight and easy-to-use key-value storage toolkit that uses JSON files for persistent local storage.
Perfect for saving configurations, user preferences, flags, or simple application state in any Python project.
Features
- ✅ Simple key-value storage using JSON
- 🐍 Pure Python, no external dependencies
- 💾 Data persists between runs
- 🔄 Lazy loading (file is read only when accessed)
- 🧪 Tested and ready for integration
Installation
pip install savekit
Usage
from savekit import SaveKit
# Initialize the store
db = SaveKit()
# Set a value
db.set_item("theme", "dark")
# Get a value
print(db.get_item("theme")) # Output: dark
# Get with default fallback
print(db.get_item("language", default="en"))
# Delete a value
db.delete_item("theme")
# Get all stored data
print(db.get_all_items()) # Output: {}
# Clear all data
db.clear_store()
# Export to another file
db.export_store("backup.json")
# Import from a file
db.import_store("backup.json")
# Reload from file (discard in-memory changes)
db.reload_store()
License
This project is licensed under the MIT License.
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
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 savekit-1.1.0.tar.gz.
File metadata
- Download URL: savekit-1.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
170482120bfdbb8566580ace48492d8226036da3e0b9e3c0ed001e5adb94753f
|
|
| MD5 |
a79c7f65f61a113a054b5ca933f6cf27
|
|
| BLAKE2b-256 |
6ef394847f6d11edeecaa18336b58dfaecd5c261f865ab8a9bad1fd347156913
|
File details
Details for the file savekit-1.1.0-py3-none-any.whl.
File metadata
- Download URL: savekit-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bef72ae54adae96e720d11ad9743dcc457572a8d4e68982ea460e2f5075ce61
|
|
| MD5 |
a51255b1cca55a1d473b750d881d6b17
|
|
| BLAKE2b-256 |
6b3d95e9f714774378f2b56ae8e274ace30f8e38e27452bebc5084ddc2d39f7f
|