Romain c5e6c56950 | |
---|---|
doc | |
static | |
templates | |
.gitignore | |
DebugServer.py | |
HandleWeatherFile.py | |
Licence note | |
README.md | |
WebServer.py |
Web server that fetch and display weather data.
The weather data are provided by 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.
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 for reference.
By default the development server is accessible via 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 where "lat" and "long" are the latitude and longitude of the place you which to display.
Note:
Use the following URL parameters to change the default behavior.
hour
day
today
0
then the current day won't be displayed.title
ui
0
the icons won't be displayed.night
1
the page will be displayed using the dark theme.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 that will display the weather for the next two days at some random tower in Paris.