Best Flask open-source libraries and packages

Restful_ajax_mongo

Restful API with user register, user login, user logout, user profile, add product, edit product, delete product, all products, product detail
Updated 2 years ago

Restful API with Ajax and Mongodb By Flask

For live preview :

Restful API with AJax

Restful API with AJax website contains:

  • User register
  • User login
  • User logout
  • User profile
  • Add product
  • Edit product
  • Delete product
  • All products
  • Product detail

Usage :

Run project by :

# run 

1. export FLASK_APP=restful_api.py

2. python -m flask run

# OR you can use

1. export FLASK_APP=restful_api.py

2. flask run

That's it.

Done :

Now the project is running at http://localhost:5000 and your routes is:

API Route HTTP Method Description
{host} GET Home page
{host}/api/add_product POST Add product
{host}/api/edit_product/{id} PUT Edit product
{host}/api/delete_product/{id} DELETE Delete product
{host}/api/all_products GET All products
{host}/api/product/{id} POST Product detail
{host}/api/categories/{category} POST Search products by category
{host}/users/register POST User register
{host}/users/login POST User login
{host}/users/profile POST User profile

For detailed explanation on how project work, read the Flask Docs and MongoDB Docs

Developer

This project made by Osama Mohamed

License

This project is licensed under the MIT License