Book Image

Building Serverless Python Web Services with Zappa

By : Abdulwahid Abdulhaque Barguzar
Book Image

Building Serverless Python Web Services with Zappa

By: Abdulwahid Abdulhaque Barguzar

Overview of this book

Serverless applications are becoming very popular these days, not just because they save developers the trouble of managing the servers, but also because they provide several other benefits such as cutting heavy costs and improving the overall performance of the application. This book will help you build serverless applications in a quick and efficient way. We begin with an introduction to AWS and the API gateway, the environment for serverless development, and Zappa. We then look at building, testing, and deploying apps in AWS with three different frameworks--Flask, Django, and Pyramid. Setting up a custom domain along with SSL certificates and configuring them with Zappa is also covered. A few advanced Zappa settings are also covered along with securing Zappa with AWS VPC. By the end of the book you will have mastered using three frameworks to build robust and cost-efficient serverless apps in Python.
Table of Contents (20 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

Designing REST APIs


We are going to design the REST API for our ImageGallery application. We developed this application with Django's admin interface. Now we will extend the existing implementation of the ImageGallery application with a RESTful API interface. Before implementing the solution, let's have a look at a brief introduction to the Django REST Framework.

 

 

What is the Django Rest Framework?

Django Rest Framework is an open source library that is designed to implement the REST API in an optimistic way. It follows the Django design pattern with different terminologies. You can find the QuickStart tutorials at its documentation site (http://www.django-rest-framework.org/#quickstart).

Django Rest Frameworks is powerful and supports ORM and non-ORM data sources. It has built-in support for the Browsable API client (https://restframework.herokuapp.com/) and many other features as well.

Note

It is recommended to not use the Web Browsable API interface in the production environment. You can...