Barebone Flask REST API
Learn how to set up and deploy a barebone REST API in Flask
2 min readOct 15, 2017
In this post we’ll set up a Flask app serving as a starting point for building a REST API. If you know some Python, you will be able to go through the steps below to successfully set up the API on your own. Note: I’m using Python 3.6.3.
The full source code can be found on Github:
https://github.com/visini/barebone-flask-rest-api
What we’ll use:
- Flask, a popular Python micro framework for the web
- Flask-RESTPlus, a Flask extension for building REST APIs
- PostgreSQL as a database (hosted remotely on AWS RDS)
- AWS Elastic Beanstalk to host our API to keep scaling in mind (alternatively, we can use a single instance on AWS EC2)
- Let’s Encrypt for SSL certificates (alternatively, you could use AWS Certificate Manager for Elastic Beanstalk deployments with a load balancer)
The end result is a fully working REST API serving as a starting point for your project (for example, a microservice).
Updated full version of this article:
Please view the updated version of this article (including full source code + syntax highlighting of all code snippets) on my website:
https://camillovisini.com/barebone-flask-rest-api-on-aws-elastic-beanstalk/
Thanks for reading!
Originally published on camillovisini.com.