April 2019
Intermediate to advanced
646 pages
16h 48m
English
Many projects require some external packages to be installed in order to work properly. When the list of dependencies is very long, there comes a question as to how to manage it. The answer in most cases is very simple. Do not over-engineer it. Keep it simple and provide the list of dependencies explicitly in your setup.py script as follows:
from setuptools import setupsetup(
name='some-package',
install_requires=['falcon', 'requests', 'delorean']
# ...
)
Some Python developers like to use requirements.txt files for tracking lists of dependencies for their packages. In some situations, you might find some reason for doing that, but in most cases, this is a relic of times where the code of that project was not properly ...