0. Getting started with wttr.py

Warning

This tutorial assumes that you have installed at least Python 3.6 with pip.

You can install wttrpy package like that:

$ python -m pip install wttrpy --user

Now you can test it out:

$ python
>>> import wttrpy
>>> wttr = wttrpy.getWttr("Amsterdam", "en")
>>> print(wttr)

The output should be something like this:

Weather report: Amsterdam

    \  /       Partly cloudy
  _ /"".-.     17 °C
    \_(   ).   ↘ 17 km/h
    /(___(__)  10 km
               0.2 mm
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Tue 14 Jul ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│  _`/"".-.     Light rain sho…│  _`/"".-.     Patchy rain po…│    \  /       Partly cloudy  │    \  /       Partly cloudy  │
│   ,\_(   ).   17 °C          │   ,\_(   ).   16 °C          │  _ /"".-.     15..17 °C      │  _ /"".-.     14 °C          │
│    /(___(__)  ↗ 9-13 km/h    │    /(___(__)  ↑ 8-10 km/h    │    \_(   ).   ↘ 17 km/h      │    \_(   ).   ↘ 8-13 km/h    │
│      ‘ ‘ ‘ ‘  10 km          │      ‘ ‘ ‘ ‘  10 km          │    /(___(__)  10 km          │    /(___(__)  10 km          │
│     ‘ ‘ ‘ ‘   0.1 mm | 98%   │     ‘ ‘ ‘ ‘   0.2 mm | 98%   │               0.2 mm | 32%   │               0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Wed 15 Jul ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│    \  /       Partly cloudy  │    \  /       Partly cloudy  │    \  /       Partly cloudy  │    \  /       Partly cloudy  │
│  _ /"".-.     18 °C          │  _ /"".-.     20 °C          │  _ /"".-.     19 °C          │  _ /"".-.     16 °C          │
│    \_(   ).   ↘ 9-10 km/h    │    \_(   ).   ↘ 13-14 km/h   │    \_(   ).   → 13-15 km/h   │    \_(   ).   → 8-12 km/h    │
│    /(___(__)  10 km          │    /(___(__)  10 km          │    /(___(__)  10 km          │    /(___(__)  10 km          │
│               0.0 mm | 0%    │               0.0 mm | 0%    │               0.0 mm | 0%    │               0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Thu 16 Jul ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│      .-.      Light drizzle  │  _`/"".-.     Light rain sho…│  _`/"".-.     Light rain sho…│  _`/"".-.     Patchy rain po…│
│     (   ).    16 °C          │   ,\_(   ).   18 °C          │   ,\_(   ).   18 °C          │   ,\_(   ).   15..16 °C      │
│    (___(__)   → 10-15 km/h   │    /(___(__)  → 16-21 km/h   │    /(___(__)  ↘ 18-22 km/h   │    /(___(__)  ↘ 12-19 km/h   │
│     ‘ ‘ ‘ ‘   7 km           │      ‘ ‘ ‘ ‘  10 km          │      ‘ ‘ ‘ ‘  10 km          │      ‘ ‘ ‘ ‘  10 km          │
│    ‘ ‘ ‘ ‘    0.4 mm | 64%   │     ‘ ‘ ‘ ‘   0.8 mm | 73%   │     ‘ ‘ ‘ ‘   0.1 mm | 71%   │     ‘ ‘ ‘ ‘   0.0 mm | 22%   │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
Location: Amsterdam, Centrum, Amsterdam, MRA, Stadsregio Amsterdam, Noord-Holland, Nederland [52.3745403,4.89797550561798]

Follow @igor_chubin for wttr.in updates