Introduction to Requirements Files
You might have seen those requirements files before, they are usually called
requirements.txt or sometimes also
requirements.pip and what they are is basically a list of pip install arguments placed in a text file.
So in this case, it includes the
requests module, with a specific version using the version specifier syntax you learned about earlier, and it also lists the
schedule module with a similar version specifier.
00:38 Now this is a very simple example but it’s also quite typical of what a real world requirements file would look like. One interesting thing you can do with these requirements files is that you can add comments to these files.
So you would just place the
# (“hash”) character and then you can place a comment. This is often helpful to explain what is going on in your requirements files or if you want to leave a comment for the next developer working on that file.
01:16 Using requirements files a Python environment can be reproduced in exactly the same way on a different machine or for different developer, or even just in a different directory on your local machine.
Become a Member to join the conversation.