pip optional dependencies

Sometimes you want to make your python package usable for different situations, e.g. flask or bottle or django.

If You want to minimize dependencies You can use an optional dependency in setup.py:

extras_require={
 'flask': ['Flask>=0.8', 'blinker>=1.1']
}

Now you can install the library with:

pip install raven[flask]

 

Leave a Reply

Your email address will not be published. Required fields are marked *