Flask is a very lightweight REST framework for python, here is a very basic tutorial to get started.
install Flask,
pip install flask,
then create one module to test the flask.
hello world test,
then run the web server,
now http://localhost:8000/, you will see the hellofalsk page,
test to list folders and return as Json,
here we put prefix in the url template. in the method we can assess the url passed from user side.
test to get the request information, like the user-agent. just import the global request.
Thursday, February 14, 2013
Python REST Framework FLASK
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment