Skip to content

shahirislam/flask-startup-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Flask Starter Kit!

Hi! I'm Shahir Islam your helper for flask startup kit.

If you just want backend web response then just clone this repo and you are good to go.
This is the first JWT authintication auth based starter kit. You are welcome mate !

Summary

Dependencies

Files and Folders

  • pycache : This is a default folder you don't need to look at it.
  • instance : This folder is for Database
  • venv : This folder is for Virtual Enviroment. You just need to activate it. You can delete it if you want.
  • requirements : This is a text file and this contains every package you need to install in one place.
  • app : This is a python file and this contains our main code.

Before you Start

--> Use this repo for only backend perpous.
--> There is no front-end.
--> This is a starter kit with JWT based auth system.
--> I used sql-lite as database.

Note : You can use db as your wish.

Installetion

Make sure you have installed python.

Step 1. Clone this repo into your local mechine.
Step 2. Open downloaded/cloned folder using any code editor.
Step 3. Activate virtual enviroment. Open terminal and type ./venv/Scripts/Activate.ps1

Note : If you have deleted venv folder then you can skip

Step 4. Install all libraries. Open terminal and type > pip install -r requirements.txt

Step 5. RUN ! Open terminal and type > python app.py

Extra : If you want to add more tables or columns to the db then type in the terminal

  > flask shell 
  > db.create_all() 

Here we use db for line 16 where we inisialize db as database variable.

Test

  • You need any web response reader software. (Postman, Insomnia, API Tester) I'm using Postman
  • After running > python app.py you should see an IP:port exm: 127.0.0.1:5000 on your terminal where the app is running. Copy that IP:port and send a GET request. If the response is success then you are good to go.
  • On /sign-up , /login I've used to input data in forms.

Sign Up /sign-up

Postman Signup

Login /login

enter image description here

Use Token /home

Token Key is : x-access-token You will get a token when you login.

enter image description here

Note : Token will expayre after 1 hour you can change this on code line 102.

Good Bye

Thanks for visiting my repo. If you are having any problem working with this please tweet me @lifeofdekisugi.

Fell free to contribute. Don't forget to spread the love 🖤

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages