Installation

You can either use use pip or you can install it from source using setuptools.

Using pip

The package releases are available on Pypi. To install the package:

pip install pywaterinfo

To use caching to overcome redundant requests to the waterinfo APi, install the cache dependencies:

pip install pywaterinfo[cache]

See Caching documentation for more information on the caching feature.

Using setuptools

After downloading the code from the repository, e.g. using git:

git clone https://github.com/fluves/pywaterinfo

Go into the directory of the package itself and install the package using setuptools:

cd pywaterinfo
python setup.py install

Issues with SSL

Note that for some companies/environments, you may have to add a custom SSL certificate to the certifi repository for the urllib queries to work. This is typically the case if you experience SSL: CERTIFICATE_VERIFY_FAILED errors. There in the utils module, there is a convenient helper routine to do just that: add_ssl_cert(). Please contact your network administrator / ICT staff to obtain the relevant certificate to use inside your domain to enable the https requests with urllib.