Skip to main content

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.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

burrowkv-0.0.4-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file burrowkv-0.0.4.tar.gz.

File metadata

  • Download URL: burrowkv-0.0.4.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

Hashes for burrowkv-0.0.4.tar.gz
Algorithm Hash digest
SHA256 836f3940b32252cc4ffb9e638dcbe7824dab04db6e4d1cba59ab862af2a9780d
MD5 bc3b0804bc7127f7d7502e49ba8dbb2e
BLAKE2b-256 391c25caa7fcb95f7b57997d42928fccf131e241e57df8cd171cf65f8f32335b

See more details on using hashes here.

File details

Details for the file burrowkv-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: burrowkv-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0rc1

File hashes

Hashes for burrowkv-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 418442943aea4ce0e5a83d08230d6accaa1326e5e521602494b0e4af43b6d849
MD5 60e97f0940897d926439cc54a504cf35
BLAKE2b-256 15854cccc6fd169f6fc952aa97416ab2fe50eb1a7ed413876f8a0a279ecc3d3a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page