Coder Social home page Coder Social logo

burrowkv's Introduction

Burrowkv

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.

burrowkv's People

Contributors

iunary avatar

Stargazers

Hadj H. avatar Bowei Zhang avatar Brian Whetter avatar Bashar Naji avatar Bhanu avatar Sharan Jhangiani avatar Daniel Weitzel avatar Noah Finberg avatar Chris Alexiuk avatar Chris Alexiuk avatar Allmight avatar  avatar Khurram Nasser avatar Rajashekar Chintalapati avatar Bonaventure Raj avatar Pranav avatar Lucas Shen Y. S. avatar Mady avatar gaurav avatar Atul Dhingra avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.