Inspiration
I really enjoyed the Primer exercises, so I decided to use my knowledge right away to develop a simple API script
What it does
The script asks the user for a city and presents the forecast for tomorrow
How we built it
Copilot was asked to generate the code using the pydoc at the top. Next, registration on weatherapi.com was made to get API
Challenges we ran into
At first, I got confused about where I was supposed to get the API key. I thought weather API did not require any registration. However, I realised it would be dangerous to have API keys in the open
Accomplishments that we're proud of
The task took me less than 30 minutes. Though I have got some experience with API and Json parsing from a Swift course, I had never done it in Python, so this challenge was a good lesson for me
What we learned
I learned how to use Json parser in Python and how to make API calls
What's next for Weather API using Copilot
I might write my own KDE applet for displaying the weather if I have time this week
Log in or sign up for Devpost to join the conversation.