Open source code for Garmin Widget connecting to Open Weather Map.
The app cand be downloaded here: https://apps.garmin.com/en-US/apps/1f3f2d10-ac05-4a9b-a8fa-bdeac8775793
This is a good example of how background processes work. Feel free to give me suggestions on improving the code.
There is also an example of Glance View for widgets.