BLOGG

This is a simple blogging app backend built with FastAPI. This project is created to simulate a real CRUD blogging system. It is built to be used by several system hence adopting the REST APIs aproach. Just like all REST APIs you can perform all functions of this system using the endpoints we created. Everything is simple and easy to use no need to read the code to understand, though you can still jump in there to make some modifications.

How to install


  • **Download and install python.**The versin should be greater than or equal to version 3.6

  • Clone the project unto your pc.

    git clone https://github.com/lokaimoma/BLOGG.git

  • Change directory to the project directory.

    cd BLOGG

  • Create a virtual environment.

    • Windows

      python -m venv venv

    • Linux and Mac OS

      python3 -m venv venv

  • Activate the virtual environment.

    • Windows

      • cmd

        .\venv\Scripts\activate

      • powershell

        .\venv\Scripts\Activate.ps1

    • Linux and Mac OS

      source venv/bin/activate

  • Install all the requirements.

    pip install -r requirements.txt

  • Set an environmental variable pointing to you database url (KEY = DATABASE_URL). Check DOCS director for how to set the variable.

    FORMAT: DATABASE_URL=sqlite+aiosqlite:///db-dev.sqlite

Read this file for other database formats and requirements to install.

  • Deactivate the environment with the command below.

    deactivate

  • Reactivate the environment again. Check above for plateformspecific steps.

  • Run this command to create the database

    alembic upgrade head

  • You can now run the program with the command below.

    • Windows

      python engine.py

    • Linux and Mac OS

      python3 engine.py

  • By default the app runs on localhost:8000

GitHub

https://github.com/lokaimoma/BLOGG