key-value store
Project description
Burrowkv
Burrowkv is a simple key-value store implementation in Python. It provides basic functionality to store and retrieve key-value pairs, as well as additional features such as JSON serialization and deserialization.
Features
- Set a value for a given key.
- Retrieve the value associated with a key.
- Delete a key-value pair.
- Check if a key exists in the store.
- Get a list of all keys.
- Get a list of all values.
- Get a list of all key-value pairs.
- Serialize the key-value store to JSON.
- Deserialize JSON into the key-value store.
Installation
pip install burrowkv
Usage
from burrowkv import burrowkv
# Create a new instance of burrowkv
store = burrowkv()
# Set a value for a key
store.set('name', 'John')
# Retrieve the value associated with a key
name = store.get('name') # Returns 'John'
# Delete a key-value pair
store.delete('name')
# Check if a key exists
if store.contains('name'):
print('Key exists')
else:
print('Key does not exist')
# Get a list of all keys
keys = store.keys() # Returns a list of keys
# Get a list of all values
values = store.values() # Returns a list of values
# Get a list of all key-value pairs
items = store.items() # Returns a list of (key, value) tuples
# Serialize the key-value store to JSON
json_data = store.to_json()
# Deserialize JSON into the key-value store
store.from_json(json_data)
License
This project is licensed under the MIT License. See the LICENSE file for more information.
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
burrowkv-0.0.2.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file burrowkv-0.0.2.tar.gz
.
File metadata
- Download URL: burrowkv-0.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f517e5a6e5ee25bc3193a38aafefdeebc22e5fb29b04d84e4c961dbff73cbbc9 |
|
MD5 | c694c6041ed1c39fc58ee2cac851f269 |
|
BLAKE2b-256 | 35d29017b60b713c9f1b9ad61273f2c00ba7aa53bfa5c5a6cbe90b4df57b148d |
File details
Details for the file burrowkv-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: burrowkv-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58221f9452255cf4da41f587eae9b2ab82f05ddf4cc72d6fa72df9f6768b7e76 |
|
MD5 | 7c50a5d86f22febb139cb0b650289b83 |
|
BLAKE2b-256 | 72a4799aed91f9b5bb4650728f85cacd66dda96ffb491f0479595f9614b9701c |