# Weather web server Web server that fetch and display weather data. ## Weather data provider The weather data are provided by [infoclimat.fr](https://www.infoclimat.fr/) (not affiliated). *Why them ?* They got weather data accessible from a registration free public API. *Are they the best ?* Probably not, their API lack modularity and some data that may be critical depending on your application. *Do they provide data outside France ?* No. ## Installation For debugging/development purpose, you could simply use ```python3 DebugServer.py``` to launch the integrated flask webserver. To deploy in production, there's multiple possibility depending on your need, see [the official flask documentation](https://flask.palletsprojects.com/en/2.1.x/deploying/) for reference. ## Usage By default the development server is accessible via [127.0.0.1:5000](127.0.0.1:5000) and display the weather of today and the next 6 days at Paris. You could navigate to [127.0.0.1:5000/lat;long](127.0.0.1:5000/lat;long) where "lat" and "long" are the latitude and longitude of the place you which to display. Note: * The freezing point and rain quantity are only displayed when it's snowing and raining respectively. * The bold number represent the gust of wind and is only displayed when it is greater than the average speed of wind. * Use the buttons on the top-left of the table to access night-mode and display the help. ![Illustration of the page](doc/Illustration.png) ### Optional parameters Use the following URL parameters to change the default behavior. * **`hour`** Use one or multiples numerical values separated by a comma to change the default displayed hours. Note that invalid values will result in empty cells. Example: [127.0.0.1:5000/?hour=8,10,12,14](http://127.0.0.1:5000/?hour=8,10,12,14) * **`day`** Indicate the number of days to display. Invalid values will result in empty cells. Example: [127.0.0.1:5000/?day=4](http://127.0.0.1:5000/?day=4) * **`today`** If set to `0` then the current day won't be displayed. Example: [127.0.0.1:5000/?today=0](http://127.0.0.1:5000/?today=0) * **`title`** Change the title of the web page. Example: [127.0.0.1:5000/?title=Weather%20at%20Paris](http://127.0.0.1:5000/?title=Weather%20at%20Paris) * **`ui`** If set to `0` the icons won't be displayed. Example: [127.0.0.1:5000/?help=0](http://127.0.0.1:5000/?help=0) * **`night`** If set to `1` the page will be displayed using the dark theme. Example: [127.0.0.1:5000/?night=1](http://127.0.0.1:5000/?night=1) Obviously you can use parameters with or without the `lat;long` elements like this: [127.0.0.1:5000/48.51296;2.17402?day=2&today=0&title=Weather%20at%20the%20Eiffel%20Tower](http://127.0.0.1:5000/48.51296;2.17402?day=2&today=0&title=Weather%20at%20the%20Eiffel%20Tower) that will display the weather for the next two days at some random tower in Paris.