Skip to content

This is a backend package that plans to build an API server, that is backed by MySQL, Redis and graphene

License

Notifications You must be signed in to change notification settings

Skhendle/Blogger-Block

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codecov

Blogger-Block

This is a learning webserver application for a user blogging platform. It will be built with fastApi, SQL-Alchemeny(SQLlite), Redis and graphene. It will have three layers. The storage layer that will store\cache all the platform data, service layer that will allow us to implement the system requirements\logic, and API layer that will allow external programs to commincate with the system.

Getting Started

# Python version: 3.9.0
"MINGW64 - bash terminal"
# Run command in directory you will be working from.
$ : git clone https://github.com/Skhendle/Blogger-Block.git
$ : cd Blogger-Block

To create virtual environment.
$ Blogger-Block : python -m venv env

# To activate virtual environment
# Windows 
$ Blogger-Block : source ".\env\Scripts\activate"
# Ubuntu 
$ Blogger-Block : source ./env/bin/activate

# To install the requirements run
$ Blogger-Block : pip  install -r requirements.txt

# To update requirements.txt after installing new package
$ Blogger-Block\app : pip freeze > requirements.txt

# To run the application use the following command
$ Blogger-Block : uvicorn app.main:app --reload

# To run a service of the application use the following command
$ Blogger-Block : uvicorn app.'service name'.main:app --reload
# E.g
$ Blogger-Block : uvicorn app.b_register.main:app --reload

# To deactivate virtual enviroment
$ Blogger-Block : deactivate

Accessing API Documentation

  • {server url}/docs
  • {server url}/redoc


API Routes Documentation Format

  • Describes how to setup a package that implements a system requirement for the application. Specifies the file name, what the file contains and how it is used

Package Layout | For Each System requirements

[x] input.py - Contains pyndatic classes, that are used as parameters for API functions and services class.

[x] route.py - Contains the API function with the url describing its service path, states its Protocol( POST, GET, DELETE or UPDATE) and calls for the service to be executed

[x] service.py - Where the logic for a system requirement is executed

[x] main.py - Allows us to run a service independently independently

Layered Package Architecture

Layed package description diagram


Class Diagrams

Layed package description diagram

About

This is a backend package that plans to build an API server, that is backed by MySQL, Redis and graphene

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages