Authentication and logging

Authentication and logging

Authentication and logging part flask-JWT :— pip install Flask-JWT JSON Web Tokens (JWT) are very popular nowadays. Modern web-development is aimed at building Single Page Applications (SPA) using latest JavaScript libraries such as Angular, React or Vue....
ItemList and creating Item

ItemList and creating Item

The itemList and creating Item from flask import Flask,request from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) items = [] class Item(Resource): def get(self,name): for item in items: if item['name']== name: return item return...
Create our item Resource

Create our item Resource

Create our item Resource from flask import Flask from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) items = [] class Item(Resource): def get(self,name): for item in items: if item['name']== name: return item return {'item':None},404 def...
First flask restful app

First flask restful app

First flask restful app from flask import Flask from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) class student(Resource): #@app.route('/student/<string:name>') def get(self,name): return {'student':name}...
Calling API from javascripts

Calling API from javascripts

Calling API from javascripts from flask import Flask,render_template from flask_restful import Resource,Api from flask import jsonify,request app = Flask(__name__) stores = [ { 'name': 'my wonderfull store', 'items':[ { 'name': 'MY ITEM', 'price': 15.99 } ] } ] api =...
Rest api create application

Rest api create application

Creating our application endpoints Json :– pip install flask-JSON The JSON format is often used for serializing and transmitting structured data over a network connection. It is used primarily to transmit data between a server and web application, serving as an...
Open chat