Reproducible Environments and Application Deploys
00:00 Welcome to the setting up reproducible environments and application deploys module. Here is where you are right now in the course, so you’ve learned how to manage third party dependencies with pip, you know how to isolate your dependencies with virtual environments and you also just learned how to find and identify quality Python packages.
00:18 Now let’s talk about another very important topic when it comes to dependency management in Python. Let’s say you’re working on a Python program, and the project has matured quite a bit, and so now finally, you want to share it with other people.
00:33 If you’re using third-party packages, in your Python program, then that might not be so easy. How can you make sure that someone else trying out your program can get the exact same set of dependencies?
00:45 Even the slightest version conflicts can make installing someone else’s Python program a very frustrating experience. So the real question here is how do you reliably specify all of the dependencies that a Python program needs?
01:00 And this is not only about sharing your programs with other people, there are many environments your Python program can run in, for example, there is likely going to be a local development environment and ideally, that development environment should be the same across all of the developers working on the project.
01:18 Then there might be automated tests that are being run on a continuous integration infrastructure. Again, all of these tests should run under the same set of dependencies, depending on the complexity of your program, there might be several deployment targets, for example, if you’re building a web application, there might be a staging server and a production server.
01:38 How can you make sure that all of those environments use the exact same set of dependencies, because using the same set of dependencies across all of these environments, with the exact same packages and the exact same version numbers, is very important to achieve a reliable deployment process.
01:56 So really, the goal here is that all environments are going to use the same set of dependencies. So this is the goal that we’re aiming for here. Now, how do you make dependency installs repeatable in Python?
02:10 And the answer is requirements files. In this module in the course you are going to learn how to use requirements files to make your application deploys and Python project installs fully repeatable.
02:24 First, you are going to go through a quick introduction to requirements files, to learn what they are, what they look like and how to use them. Right after that, you are going to learn how to capture project dependencies automatically using pip.
02:36 In the third lesson in this module, you are going to learn how to restore captured dependencies in order to deploy your application. Next, you’re going to learn some tricks on how to separate your development and production dependencies; to conclude the module, you are going to learn some best practices around requirements files that will make working with them a lot easier.
02:54 Alright, time to make your Python application deploys fully repeatable, let’s jump right in.
Become a Member to join the conversation.