Skip to content

Latest commit

 

History

History

FastAPI-RedisDB

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Creating a API using FastAPI with REDIS Database

FILE DETAILS :

HASH.PY : Create hashes using hset and add them into redis db

CONNECTION.PY : Made a connection with Redis db using redis_cache

MAIN.PY : Access db with GET,SET,and POST methods


NOTES

RUN FASTAPI : uvicorn main:app --reload


COMMANDS :

START REDIS SERVER : redis-server

START REDIS SERVER : redis-server --port 6360

STOP REDIS SERVER : /etc/init.d/redis-server stop

START REDIS SERVER : /etc/init.d/redis-server start

STOP REDIS SERVER : sudo service redis-server stop

START REDIS CLIENT : redis-cli

GET REDIS KEYS : key *

GET REDIS KEYS : redis-cli keys