Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rest in flask

485 views

Published on

RESTful Web Service Development with Flask

Here is the sample project:
https://github.com/hamidfzm/Rest-in-Flask

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Rest in flask

  1. 1. REST in Flask Hamid Feizabadi @hamidfzm Salar Nasiri @salarnasiri74
  2. 2. REpresentational State Transfer
  3. 3. is not a standard
  4. 4. is not a protocol
  5. 5. is an architectural style for networked applications
  6. 6. The characteristics • Client-Server • Stateless • Cacheable • Layered System • Uniform Interface • Code on demand
  7. 7. RESTful web service • HTTP protocol • Methods • GET • POST • PUT • DELETE • PATCH
  8. 8. RESTful web service • Resources represented by URIs • Data Representations • JSON • YAML • XML • HTML
  9. 9. RESTful web service • Resources represented by URIs • Data Representations • JSON • YAML • XML • HTML
  10. 10. Flask • MicroFramework written in Python for the web • Micro meaning simple core but highly extensible • Used to create websites and API’s
  11. 11. Why Flask? • Easy to learn • Pythonic • Import only what you need • Flask won’t make any decisions for you, such as what database to use • Small but can easily handle large apps • Testable
  12. 12. Under the Hood WSGI Template Engine
  13. 13. Under the Hood • 1000 Lines of Tests • 450 Lines of actual code • 5000 Lines of Documentation
  14. 14. Tools and Libraries • Flask-RESTful (http://flask-restful- cn.readthedocs.io/en/0.3.4/index.html) • Flask RestPlus (http://flask-restplus.readthedocs.io/ en/latest/) • Flask Restless (https://flask- restless.readthedocs.io/en/latest/) • http://blog.miguelgrinberg.com/post/restful- authentication-with-flask
  15. 15. Flask-RESTful
  16. 16. Let’s Code!!! https://github.com/hamidfzm/Rest-in-Flask
  17. 17. RESTful Documentation
  18. 18. APIDOC JS http://apidocjs.com/
  19. 19. References • http://flask.pocoo.org/ • http://flaskbook.com/ • http:// blog.miguelgrinberg.com/ post/designing-a-restful-api- with-python-and-flask
  20. 20. Questions?
  21. 21. The End

×