Book Image

Mastering Flask

By : Jack Stouffer
Book Image

Mastering Flask

By: Jack Stouffer

Overview of this book

Starting from a simple Flask app, this book will walk through advanced topics while providing practical examples of the lessons learned. After building a simple Flask app, a proper app structure is demonstrated by transforming the app to use a Model-View-Controller (MVC) architecture. With a scalable structure in hand, the next chapters use Flask extensions to provide extra functionality to the app, including user login and registration, NoSQL querying, a REST API, an admin interface, and more. Next, you’ll discover how to use unit testing to take the guesswork away from making sure the code is performing as it should. The book closes with a discussion of the different platforms that are available to deploy a Flask app on, the pros and cons of each one, and how to deploy on each one.
Table of Contents (20 chapters)
Mastering Flask
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Deploying on Amazon web services


Amazon Web Services (AWS) is a collection of application platforms maintained by Amazon and built on top of the same infrastructure that runs amazon.com. To deploy our Flask code, we will be using Amazon Elastic Beanstalk, while the database will be hosted on Amazon Relational Database Service, and our messaging queue for Celery will be hosted on Amazon Simple Queue Service.

Using Flask on Amazon Elastic Beanstalk

Elastic Beanstalk is a platform for web applications that offers many powerful features for developers, so web developers do not have to worry about maintaining servers.

For example, your Elastic Beanstalk application will automatically scale by utilizing more and more servers as the number of people using your app at once grows. For Python apps, Elastic Beanstalk uses Apache in combination with mod_wsgi to connect to WSGI applications, so there is no extra configuration needed.

Before we begin, you will need an Amazon.com account and log in to http...