Summary

This chapter was about deploying your Python code to production. We looked at the different factors that affect the deployability of a system. We went on to discuss the tiers in deployment architecture, such as the traditional four-tiered and the three- and two-tiered architectures, including combinations of development, testing, staging/QA, and production tiers.

We then went on to discuss the details of packaging Python code. We discussed the tools of PIP and virtualenv in detail. We looked at how pip and virtualenv can work together, and how to install a set of requirements using pip, and set up similar virtual environments using it. We also took a quick look at relocatable virtual environments.

We then went to discuss PyPI—the Python Package Index which hosts Python third-party packages on the web. We then went through a detailed example of setting up a Python package using setuptools and the setup.py file. We used the mandelbrot application as an example in this case.

We ended that discussion by showing how to register the package to PyPI using its metadata, and also how to upload the package data including its code. We also took a brief look at PyPA, the Python Packaging Authority and their projects.

After that, two tools, both developed in Python, were discussed—Fabric for remote automated deployments, and Supervisor for remote management of processes on Unix systems. We finished the chapter with an overview of the common deployment patterns that one can use to solve deployment problems.

In the final chapter of this book, we talk about a variety of techniques of Debugging your code to identify potential issues.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.12.156