Metadata-Version: 2.4
Name: key-multivalue-storage
Version: 1.2.2.20260517.3b0
Summary: A simple library that allows the JSON storage of one key to multiple values.
Author: Boss_1s
License-Expression: GPL-2.0-only
Project-URL: Documentation, https://github.com/Boss-1s/key_multivalue_storage/wiki/
Project-URL: Repository, https://github.com/Boss-1s/key_multivalue_storage/
Project-URL: Issues, https://github.com/Boss-1s/key_multivalue_storage/issues/
Keywords: json,json wrapper,python,database,storage,wrapper-library
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Database
Classifier: Topic :: File Formats :: JSON
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pylint; extra == "dev"
Dynamic: license-file

# Key to Multivalue Storage - kms
kms - a tiny side project tuned into a library.


![CPython](https://img.shields.io/badge/CPython-3.12%20%7C%203.13%20%7C%203.14-purple?style=for-the-badge)

---

[![Release](https://img.shields.io/github/actions/workflow/status/Boss-1s/key_multivalue_storage/.github%2Fworkflows%2Frelease.yml?style=for-the-badge&label=Release%20Env&labelColor=maroon)](https://github.com/Boss-1s/key_multivalue_storage/deployments/release)
[![Tests](https://img.shields.io/github/actions/workflow/status/Boss-1s/key_multivalue_storage/.github%2Fworkflows%2Ftest.yml?style=for-the-badge&label=Tests&labelColor=blue)](https://github.com/Boss-1s/key_multivalue_storage/deployments/test)
[![License](https://img.shields.io/pypi/l/key-multivalue-storage?style=for-the-badge&color=cyan&labelColor=%230a6149)](https://github.com/Boss-1s/key_multivalue_storage/blob/main/LICENSE)

---

[![PyPI - Version](https://img.shields.io/pypi/v/key-multivalue-storage?style=for-the-badge&label=Latest&color=teal)](https://github.com/Boss-1s/key_multivalue_storage/releases)

## Installation
Install with `pip`:
```bash
pip install -U key-multivalue-storage
```

Or, download the latest version of the `.whl` file [in the releases page](https://github.com/Boss-1s/key_multivalue_storage/releases)

You can also choose to download the development environment alongside the package:
```sh
pip install -U key-multivalue-storage[dev]
```

## Usage
- Create a Storage object to prepare the data to be stored:
```py
from key-multivalue-storage import Storage
my-db = Storage("my_top_level_key", mysubkey="myvalue", myothersk="anotherval")
```
- To store the object, use `Storage.store()`.
```py
my-db.store("database.json")
```
- You can change certain global settings for each `Storage` instance.
```py
Storage.indent = 4 #indent size of JSON files
Storage.encode = True # Whether to encode stored values
Storage.auto_delete_self = True
# Whether to automatically release the object
# from memory after certain operations i.e.
# Storage.store()
```

### See the full documentation [here](https://github.com/Boss-1s/key_multivalue_storage/wiki)!
