際際滷

際際滷Share a Scribd company logo
Rest in flask
REST in Flask
Hamid Feizabadi
@hamidfzm
Salar Nasiri
@salarnasiri74
REpresentational State Transfer
is not a standard
is not a protocol
is an architectural style for
networked applications
The characteristics
? Client-Server
? Stateless
? Cacheable
? Layered System
? Uniform Interface
? Code on demand
RESTful web service
? HTTP protocol
? Methods
? GET
? POST
? PUT
? DELETE
? PATCH
RESTful web service
? Resources represented by URIs
? Data Representations
? JSON
? YAML
? XML
? HTML
RESTful web service
? Resources represented by URIs
? Data Representations
? JSON
? YAML
? XML
? HTML
Flask
? MicroFramework written in Python for the web
? Micro meaning simple core but highly extensible
? Used to create websites and API¨s
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
Under the Hood
WSGI Template Engine
Under the Hood
? 1000 Lines of Tests
? 450 Lines of actual code
? 5000 Lines of Documentation
Tools and Libraries
? Flask-RESTful (http://?ask-restful-
cn.readthedocs.io/en/0.3.4/index.html)
? Flask RestPlus (http://?ask-restplus.readthedocs.io/
en/latest/)
? Flask Restless (https://?ask-
restless.readthedocs.io/en/latest/)
? http://blog.miguelgrinberg.com/post/restful-
authentication-with-?ask
Flask-RESTful
Let¨s Code!!!
https://github.com/hamidfzm/Rest-in-Flask
RESTful Documentation
APIDOC JS
http://apidocjs.com/
Rest in flask
Rest in flask
References
? http://?ask.pocoo.org/
? http://?askbook.com/
? http://
blog.miguelgrinberg.com/
post/designing-a-restful-api-
with-python-and-?ask
Questions?
The End

More Related Content

Rest in flask