Posts

Showing posts from 2016

How to build a simple RESTful API with Flask

I built this proof of concept (POC) for another project someone else was working on. They had built a basic RESTful API using Flask. But needed to add authentication and HTTPS support. I was pleasantly surprised how easy it was to go from zero to a basic RESTful API with TLS HTTPS and authentication via URL argument or headers. I'm writing this post to demonstrate how easy it truly is to setup a simple, safe and secure RESTful API using Flask. Step 1  Install Python I'll skip the steps on how to install Python. But I will just say that I got this working easily with both Python 2.7 on Linux and Python 3.5 on Windows. Step 2  Install Flask and clone my repo Flask is also easy to install by following their Quickstart Installation Guide. However, stop before doing the "mkdir myproject" step and clone my " flask-api-key " repo instead. Step 3  Activate a venv Then do: $ cd flask-api-key $ virtualenv venv New python execut

How to build a simple RESTful API with Flask

I built this proof of concept (POC) for another project someone else was working on. They had built a basic RESTful API using Flask. But needed to add authentication and HTTPS support. I was pleasantly surprised how easy it was to go from zero to a basic RESTful API with TLS HTTPS and authentication via URL argument or headers. I'm writing this post to demonstrate how easy it truly is to setup a simple, safe and secure RESTful API using Flask. Step 1  Install Python I'll skip the steps on how to install Python. But I will just say that I got this working easily with both Python 2.7 on Linux and Python 3.5 on Windows. Step 2  Install Flask and clone my repo Flask is also easy to install by following their Quickstart Installation Guide. However, stop before doing the "mkdir myproject" step and clone my " flask-api-key " repo instead. Step 3  Activate a venv Then do: $ cd flask-api-key $ virtualenv venv New python executa

How to build a simple RESTful API with Flask

I built this proof of concept (POC) for another project someone else was working on. They had built a basic RESTful API using Flask. But needed to add authentication and HTTPS support. I was pleasantly surprised how easy it was to go from zero to a basic RESTful API with TLS HTTPS and authentication via URL argument or headers. I'm writing this post to demonstrate how easy it truly is to setup a simple, safe and secure RESTful API using Flask. Step 1  Install Python I'll skip the steps on how to install Python. But I will just say that I got this working easily with both Python 2.7 on Linux and Python 3.5 on Windows. Step 2  Install Flask and clone my repo Flask is also easy to install by following their Quickstart Installation Guide. However, stop before doing the "mkdir myproject" step and clone my " flask-api-key " repo instead. Step 3  Activate a venv Then do: $ cd flask-api-key $ virtualenv venv New python execu

How to build a simple RESTful API with Flask

I built this proof of concept (POC) for another project someone else was working on. They had built a basic RESTful API using Flask. But needed to add authentication and HTTPS support. I was pleasantly surprised how easy it was to go from zero to a basic RESTful API with TLS HTTPS and authentication via URL argument or headers. I'm writing this post to demonstrate how easy it truly is to setup a simple, safe and secure RESTful API using Flask. Step 1  Install Python I'll skip the steps on how to install Python. But I will just say that I got this working easily with both Python 2.7 on Linux and Python 3.5 on Windows. Step 2  Install Flask and clone my repo Flask is also easy to install by following their Quickstart Installation Guide. However, stop before doing the "mkdir myproject" step and clone my " flask-api-key " repo instead. Step 3  Activate a venv Then do: $ cd flask-api-key $ virtualenv venv New python execu

How to build a simple RESTful API with Flask

I built this proof of concept (POC) for another project someone else was working on. They had built a basic RESTful API using Flask. But needed to add authentication and HTTPS support. I was pleasantly surprised how easy it was to go from zero to a basic RESTful API with TLS HTTPS and authentication via URL argument or headers. I'm writing this post to demonstrate how easy it truly is to setup a simple, safe and secure RESTful API using Flask. Step 1  Install Python I'll skip the steps on how to install Python. But I will just say that I got this working easily with both Python 2.7 on Linux and Python 3.5 on Windows. Step 2  Install Flask and clone my repo Flask is also easy to install by following their Quickstart Installation Guide. However, stop before doing the "mkdir myproject" step and clone my " flask-api-key " repo instead. Step 3  Activate a venv Then do: $ cd flask-api-key $ virtualenv venv New python execu