DEV Community

Cover image for Building the Salim Writing Blog
Salim Ọlánrewájú Oyinlọlá
Salim Ọlánrewájú Oyinlọlá

Posted on

Building the Salim Writing Blog

Overview of my Submission

For my submission in the Redis Hackathon, I built a Blog Service with python's fastest web framework, FastAPI and Redis OM. I was able to create a Redis database on Redis, database models with Redis-OM and then develop Restful APIs with Python FastAPI that could interact with Redis to create, retrieve and search data. FastAPI is a modern, high-performance Web framework for developing RESTful APIs in Python. It is known for being fast, easy and automatically generating swagger API docs.

The inspiration for this project is simply from how much I love to write. By virtue of how much I love to write and my curiosity as a software engineer, I have always wondered what the database architecture of blogging services would be like.

Here is the link to the GitHub repository what I built is stored in containing a README and a MIT license.

https://github.com/salimcodes/salim-blog

Submission Category: Wacky Wildcards

Here's a short video that explains the project and how it uses Redis:

IMAGE ALT TEXT HERE

Language Used

I used Python for my project.

Link to Code: GitHub repository containing a README and a MIT license

Salim Blog API

A Simple Blog Service created with Fast API and Redis-OM

image

image

image

Overview video

Here's a short video that explains the project and how it uses Redis:

IMAGE ALT TEXT HERE

How it works

The blog is pretty simple. It has the following API's;

  • A GET method at the home page that displays the message Hello world, I am Salim from Africa!.

  • Two POST methods [to create authors and blogs respectively] that users can use to create a new blog and register as an author.

The author method collects the pk, first name, last name, email address, bio of the author and the date the author joined. The schema is shown below.

"pk": "string",
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "bio": "string",
  "date_joined": "2022-08-24T16:59:09.222111"
  • A GET method that retrieves the created blogs.

  • A PUT method that is capable of updating blogs.

  • A DELETE method that makes users able to delete blogs.

How

Collaborators

Solo project

Screenshots and Demos

image

image

image

image

Top comments (1)

Collapse
 
wpeterw profile image
wpeterw

You have hard-coded your Redis credentials, they're on Github now.