Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

Using Gevent with Python applications


So far in this chapter, you have used Apache with mod_wsgi to run your Python applications. It is also possible to run other standalone WSGI servers, such as Gevent and Gunicorn, with OpenShift. In this recipe, you will learn how to use Gevent to run your Python applications. Gevent is a coroutine-based Python networking library that uses greenlet to provide a high-level, synchronous API on top of the libevent event loop. The source code for this repository is on GitHub at https://github.com/OpenShift-Cookbook/chapter8-gevent-recipe.

Getting ready

This recipe is based on the assumption that you have read the previous recipes in this chapter. To step through this recipe, you will need the rhc command-line client installed on your machine. Please refer to the Installing the OpenShift rhc command-line client recipe in Chapter 1, Getting Started with OpenShift, for details. Also, if you want to run the application on your local machine, you will need to have...