Metadata-Version: 2.4
Name: sqlvault
Version: 0.0.6
Summary: Simple SQL-based key/value store
Author-email: Peter Mirzoian <fragarie.dev@yandex.com>
License: MIT License
        
        Copyright (c) 2025 j2cry
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: sqlalchemy>=2.0.0
Dynamic: license-file

# Simple SQL-based key/value store

## Install
```sh
pip install sqlvault
```

## How to use

```python

from sqlvault import SQLVault

vault = SQLVault('sqlite:///local.db', tables=['keysA', 'keysB'])

keys_a_vault = vault.interface('keysA')
keys_b_vault = vault.interface('keysB')

keys_a_vault['k1'] = 'av1'
keys_b_vault['k1'] = 'bv1'

keys_a_vault['k1']
>>> 'av1'

keys_b_vault['k1']
>>> 'bv1'
```

## Limitations

As you can see, the interface is very similar to a dictionary, but there is no way to
- get all the stored keys (since the keys themselves are not stored - only their hashes)
- get all stored key/value pairs (in view of the previous point)
