Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.08 KB

README.md

File metadata and controls

27 lines (22 loc) · 1.08 KB
FastAPI backend API to demonstrate permissioned routes
Stack
  • fastAPI web framework
  • Sqlite3 database
Installation
  • Use an environment with python3 installed

  • Open a terminal and navigate to project's folder cd backend/

  • Create a python virtual environment by running the following command: python3.11 -m venv python_venv

  • Activate the python virtual environment by running the command: source python_venv/bin/activate

  • Install requirements of app by running the following command: pip3 install -r requirements.txt

  • Create admin user by inserting directly into local_storage.db database via an Sqlite3 browser tool:

    • INSERT INTO users (email,password,name,surname, role) VALUES('[email protected]', '$2b$12$tLGdEP/3.B.sFTNITAfX5uLDzs6kgXq1PU8yxP/EnFIPBBWsvR4HG', 'Admin name', 'Admin surname', 'ADMINISTRATOR');
    • Created user:
  • Run the server

    • python3.11 main.py
  • Access the API at localhost:9999/v1

  • Access the API Swagger UI documentation at localhost:9999/v1/documentation