Labs
RESTful Labs
Flask-RESTful
Flask-RESTful is an extension for Flask that adds support for quickly building REST APIs. It is a lightweight abstraction that works with your existing ORM/libraries. Flask-RESTful encourages best practices with minimal setup. If you are familiar with Flask, Flask-RESTful should be easy to pick up. Flask-RESTful Documentation
It’s time to write your first REST API. This guide assumes you have a working understanding of Flask, and that you have already installed both Flask and Flask-RESTful. Here
root@board:~# pip install flask-restful
Downloading/unpacking Flask
Downloading Flask-0.10.1.tar.gz (544kB): 544kB downloaded
Downloading/unpacking flask-restful
Downloading Flask-RESTful-0.3.5.tar.gz (102kB): 102kB downloaded
Downloading/unpacking aniso8601>=0.82 (from flask-restful)
Downloading aniso8601-1.1.0.tar.gz (49kB): 49kB downloaded
Downloading/unpacking python-dateutil (from aniso8601>=0.82->flask-restful)
Downloading python-dateutil-2.5.1.tar.gz (235kB): 235kB downloaded
Installing collected packages: Flask flask-restful, aniso8601, python-dateutil
Successfully installed Flask flask-restful aniso8601 python-dateutil
Cleaning up...
root@board:~#Connect to your boardipaddress:5000/datasensor in a web browser...
Once connected your board will display under the terminal:
Once connected your browser will display:
Last updated