- Python 3.7.1.
- An activated python virtualenv.
Clone the repository and install it:
git clone https://github.com/michaeltcoelho/clima.git
Go to /clima
directory:
Run the following command:
make install
Running tests:
make test
See help:
clima show --help
You gonna see the following output:
Usage: clima show [OPTIONS]
Display a given number of brazilian cities weather data ordered.
Options:
--concurrency INTEGER
--limit INTEGER
--help Show this message and exit.
You can pass as options the number of concurrent scrapers running and the number of cities you want to scrape.
clima show --concurrency 2 --limit 1
Result:
+---------------+-------+----------+---------------+---------------+-----------+
| City | State | Month | Min. Temp. (˚ | Max. Temp. (˚ | Rain (mm) |
| | | | C) | C) | |
+---------------+-------+----------+---------------+---------------+-----------+
| Abadia de Goi | GO | Dezembro | 21 | 29 | 264 |
| ás | | | | | |
+---------------+-------+----------+---------------+---------------+-----------+