Hi Soumil, Thanks very much for this video. Really very useful and faster way of learning. Onlything I just like to mention is that there is a small issue in the "GET" method. Like when you add 2 items in the LIST via POST call and then try to use the GET Call to retrieve the second item from the list. You will see the GET Call will return you null. However, I have fixed the issue and will wait for your upcoming more videos in FLASK.
Thanks for an amazing video! I've built a restAPI using python Flask and tried to test POST request using python, it works fine with postman however keeps on giving me `response Error 500` when trying to call post request. I am running Flask server locally and sending POST request locally using python module requests.
hi , i have a question i hope you will be able to ans me. suppose i have a flask api . now someone is calling my api from the ui side sending multiple request may be same or different requests. is there any way that i can count those number of request. and some how i can make those request concurent ??? thank you in advance ans me if you know
from flask import Flask, request from flask_restful import reqparse, abort, Api, Resource app = Flask(__name__) api = Api(app) Data=[] class People(Resource): def get(self,name): for x in Data: if x['Data'] == name: return {'Data':name} else: return {'Data':None} def post(self,name): Tem={'Data':name} Data.append(Tem) return Tem def delete(self,name): for ind,x in enumerate(Data): if x['Data'] == name: Tem=Data.pop(ind) return {'Note':'Deleted'} api.add_resource(People,'/') if __name__ == '__main__': app.run(debug=True)
It sucks when you were copying each and every line from these guys carefully, and still it doesn't work on your machine. My Post request is working. Thanks for that. But Get request is not working. "Unexpected argument name" is the exception. I though I will learn this REST Api thing from your tutorial. But now I am dropping out.
@@SoumilShah It's sad that instead of solving my problem you are very prompt in replying me a goid bye. Some of your viewers are beginner. They don't know shit about rest api and all. Anyways, your life is already set. I need to set mine. Already wasted enough time here. Good bye.
Ketan Kulkarni good maybe if you changed the tone a bit I would helped but yes good bye don’t need negative people like you here goodbye 1 negative subscriber is not going to affect me good luck
Hi Soumil,
Thanks very much for this video. Really very useful and faster way of learning. Onlything I just like to mention is that there is a small issue in the "GET" method. Like when you add 2 items in the LIST via POST call and then try to use the GET Call to retrieve the second item from the list. You will see the GET Call will return you null. However, I have fixed the issue and will wait for your upcoming more videos in FLASK.
sir i have no words how to say thanks but as a regard thanks to youreally helpfull
So happy to see this video, that is what I want to learn, hope more
Yaxing Wang sure
And the PUT?
bro, your get and delete methods need 'name' as a parameter also. In the vid only POST has it!
Thanks for an amazing video! I've built a restAPI using python Flask and tried to test POST request using python, it works fine with postman however keeps on giving me `response Error 500` when trying to call post request. I am running Flask server locally and sending POST request locally using python module requests.
hi , i have a question i hope you will be able to ans me.
suppose i have a flask api . now someone is calling my api from the ui side sending multiple request may be same or different requests. is there any way that i can count those number of request. and some how i can make those request concurent ???
thank you in advance ans me if you know
Can we use it in Chatbot flask api
from flask import Flask, request
from flask_restful import reqparse, abort, Api, Resource
app = Flask(__name__)
api = Api(app)
Data=[]
class People(Resource):
def get(self,name):
for x in Data:
if x['Data'] == name:
return {'Data':name}
else:
return {'Data':None}
def post(self,name):
Tem={'Data':name}
Data.append(Tem)
return Tem
def delete(self,name):
for ind,x in enumerate(Data):
if x['Data'] == name:
Tem=Data.pop(ind)
return {'Note':'Deleted'}
api.add_resource(People,'/')
if __name__ == '__main__':
app.run(debug=True)
How to create a flask API to handle a POST request and return a list of scores and the input format is json data
It’s really easy follow my basic tutorial on flask
@@SoumilShah can you tell me which tutorial should I watch.
Hi Soumil! Thank you very much for your videos. Nice work. I have a doubt with your get definition: do you need a name input on that? Best!
No that was just for explanation I took that example
JSON is not dict .... in python... they just look similar. isn't it?
sarfaraz ahmed almost same
Dict can be convert to json with dumps method
would i get python + flask + jwt token code?
Hi soumil! I was wondering if you know how can I get a HTTP Status Code of 205?
Antonieta Pinto Rebelo put 205 after you do your return statement. Like this return “mess”,205
@@SoumilShah Thank you so much!
CRUD- create read update delete :)
morsest post request I have ever seen
It sucks when you were copying each and every line from these guys carefully, and still it doesn't work on your machine. My Post request is working. Thanks for that. But Get request is not working. "Unexpected argument name" is the exception. I though I will learn this REST Api thing from your tutorial. But now I am dropping out.
Ketan Kulkarni good for you good bye
@@SoumilShah It's sad that instead of solving my problem you are very prompt in replying me a goid bye. Some of your viewers are beginner. They don't know shit about rest api and all. Anyways, your life is already set. I need to set mine. Already wasted enough time here. Good bye.
Ketan Kulkarni good maybe if you changed the tone a bit I would helped but yes good bye don’t need negative people like you here goodbye 1 negative subscriber is not going to affect me good luck
@@SoumilShah I was not your subscriber anyway. And definately not gonna be one. Good luck for your future.
Ketan Kulkarni good bye please don’t waste my or your time more thanks goodbye
he skipped video when he was done eorror
after adding Soumil and Shah both if you hit a get request "shah" still its giving the {data : null }
Only the first added post is working for get
@@saumyadiptasarkar2261 need to add name as an input of get()
عليك غضب الله
Hello bro, how to run that code behind apache rather than basic flask http server? Please help.