Giter Site home page Giter Site logo

medis's Introduction

author title
Mohammad Esmaeili
Medis (PyInMemStore)

Medis: another in memory datastore

  • a simple in memory store like redis
  • use redis-cli to connect
  • includes data persistense using pickle

Requirements (Prerequisites)

  • Python 3.11 and up
  • pytest

Run with docker

  docker compose up --build

development setup guide:

  • setup virtual environment
 python3.11 -m venv venv && source venv/bin/activate
  • install dependencies
pip install -r requirements.txt
  • run server
sudo chmod +x medis.sh
./medis.sh
  • connect using redis cli
redis-cli -p 6689

Commands

  • SET (ex: set test_key test_value {ttl in milliseconds like 10000})
  • GET (ex: get test_key)
  • DEL (ex: del test_key)
  • TTL (ex: ttl test_key)
  • PING
  • COMMAND (just greetings)

Running the tests

we are using pytest as testing library so easily run pytest to run tests

    pytest

How to Contribute

Mention how anyone can contribute to make this project more productive or fix bugs in it.

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.

Steps to contribute:

  1. Fork this repository (link to your repository)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

OOP Design patterns:

  • Command Pattern for redis commands
  • Thread safe Singleton Pattern for db store
  • mono (single) observer for db persistors

medis's People

Contributors

momhiar avatar

Stargazers

 avatar

Watchers

 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.