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

Installing and configuring Django


Configuring any Python project requires following a standard for maintaining the necessary package's versions. Many developers prefer to maintain the requriements.txt file, which helps them to keep the application stable. Any version upgrade of specific packages as mentioned in the requirements.txt may break the whole application. That's the reason developers strictly follow this standard to maintain a stable version of their application.

Setting up a virtual environment

I was following the traditional pattern until I came across a very cool tool that changed my traditional approach to maintaining the requirements.txt file. Now you won't need the requirements.txt anymore. It's called pipenv; I love to use it.

 

Pipenv is a Python package management tool inspired by numerous package management tools of different languages, such as npm, Yarm, cargo, composer, builder, and so on. Pipenv is officially recommended by Python.org (https://www.python.org/). This tool...