Skip to content

jliberma/restapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

restapi

Background:

Tutorials:

Environment setup

$ conda install --name py36 flask
$ conda list -n py36
# packages in environment at /Users/jacobliberman/miniconda2/envs/py36:
#
aniso8601                 1.2.1                     <pip>
click                     6.7                      py36_0  
flask                     0.12.1                   py36_0  
Flask-HTTPAuth            3.2.2                     <pip>
Flask-PyMongo             0.4.1                     <pip>
Flask-RESTful             0.3.5                     <pip>
itsdangerous              0.24                     py36_0  
jinja2                    2.9.6                    py36_0  
markupsafe                0.23                     py36_2  
mkl                       2017.0.1                      0  
mongodb                   3.3.9                         0  
numpy                     1.12.1                   py36_0  
openssl                   1.0.2k                        1  
pep8                      1.7.0                    py36_0  
pip                       9.0.1                    py36_1  
pygame                    1.9.3                     <pip>
pymongo                   3.3.0                    py36_0  
python                    3.6.1                         0  
python-dateutil           2.6.0                     <pip>
pytz                      2017.2                    <pip>
readline                  6.2                           2  
setuptools                27.2.0                   py36_0  
six                       1.10.0                    <pip>
sqlite                    3.13.0                        0  
tk                        8.5.18                        0  
werkzeug                  0.12.1                   py36_0  
wheel                     0.29.0                   py36_0  
xz                        5.2.2                         1  
zlib                      1.2.8                         3
$ source activate py36
$ python -V
Python 3.6.1 :: Continuum Analytics, Inc.

Six Design Rules for a REST system

  1. client-server
  2. stateless
  3. server indicates if requests are cacheable
  4. layered system -- intermediaries can respond instead of server without client interaction
  5. uniform interface
  6. optional -- servers can provide scripts or executables for clients to run in their context

REST was originally designed to fit the HTTP protocol.

In REST resources are represented as URIs.

Designing a REST API is an exercise in identifying resources to expose and writing request methods to affect them.

Releases

No releases published

Packages

No packages published

Languages