Skip to content

darkaico/mini-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4befc08 · Jun 28, 2020

History

25 Commits
Jun 28, 2020
Jun 28, 2020
Jun 26, 2020
Jun 28, 2020
Jun 20, 2020
Jun 28, 2020
Jun 26, 2020
Jun 26, 2020
Jun 28, 2020
Jun 26, 2020
Jun 26, 2020
Jun 26, 2020
Jun 26, 2020
Jun 28, 2020

Repository files navigation

Build Status Coverage Status

Mini-Redis Implementation

Simple project of a mini REDIS implementation.

Main purpose is academic in order to understand Redis commands and how could be exposed through an API.

Structure

This project is divided in 2 main apps and a utils module

Mini Redis

We will find here our mini Redis library, which could be used directly through its singleton instance.

from mini_redis import MiniRedis

# Set a value using `x1` as key
MiniRedis.instance().set('x1', 'Wolverine')

# Get previous value
MiniRedis.instance().get('x1')

Api

Simple HTTP server using flask.

REST API

Utils

Simple utils to help about data parsing and singleton uses

Requirements

  • Python Version: 3.8+

Required Libraries

Development Libraries

Usage

Local Env

Im using Poetry as a dependency management. So once you set your environment to be python 3.8^ compatible you need to run

In case you dont have poetry installed

pip install poetry

Install dependencies

poetry install

Docker

In case you are using docker there is a Dockerfile that will build the project image and will start the server.

Build the dockerfile

docker build .

Run the container

docker run <container id>

Commands

In order simplify tasks I created a make file that have some useful commands

Run unit tests

make test

Start HTTP server

make start

Seed some data

make seed

Build docker image

make docker_build

Start docker image

make docker_start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published