Skip to content
Advertisement

How can I specify requirements for development separately from actual application dependencies? In a Python project and in general?

We have dependencies required for local development that we’d like to specify in our project for the sake of other developers. These dependencies are not actually required by the application though. In python we specify dependencies that the app need in a requirements.txt.

What is the best practice for specifying/pinning development specific (not required by the app) dependencies and packages? In python projects?

Advertisement

Answer

I configure my projects with a requirements.txt file for the virtual environment.

I also have a requirements.dev.txt file where I put my special developer helpful libraries.

pip install -r requirememts.dev.txt

Where my requirements.dev.txt is like

-r requirements.txt
django-debug-toolbar>=1.7
ipython>=5.5
readline>=6.2
djangorestframework==3.8.2
djangorestframework-api-key==0.3.1

The first line cause the standard requirements.txt file to load

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement