Giter Club home page Giter Club logo

rdatastore's Introduction

RDataStore

This is a complete Data Store with Create, Read, Delete and Print operations. It is implemented using Python.

How to run?

  • Clone this repository and use the RData.py module to use the CRD data store
    python RData.py
  • Alternatively for checking this code, I have made an interactive program called app.py
    python app.py
  • Unit tests are available in the tests.py module
    python -m unittest tests

About the Data Store

Uses the python dictionary to store the key value pairs. However this process is complicated by the presence of Time-To-Live(TTL). Thus the data store skeleton looks like below.

{
  key: [value, time_to_live],
}

Characteristic of the Data Store

Creation Characteristics

  • The data store throws an error when a duplicate key is created.
  • The data store throws an error when the memory limit is exceeded.
  • The data store throws an error when a non-JSON value is paired with a key.

Read/Delete Characteristics

  • The data store throws an error when a non-existent key is tried to be read/deleted.
  • The data store throws an error when the Time-To-Live has expired and the key is tried to be read/deleted.

Print Characteristics

  • The data dictionary is printed in a JSON format in data_store.json when the print operation is called.

You can reach me on:

linkedin website medium

rdatastore's People

Contributors

rahulhegde99 avatar

Watchers

James Cloos 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.