How to Build a Weather App with Python | Weather API

Поділитися
Вставка
  • Опубліковано 3 жов 2024
  • Hey guys, welcome back! In this video, I will be walking you through how to develop a weather app using the Python programming language. We'll use the OpenWeatherMap API to retrieve weather data and use the requests library in Python to fetch the weather API.
    Code in this video: github.com/arp...
    If you don't know about Python, Python is a high-level programming language that is used to create computer applications. It is an interpreted language, meaning that it can be executed by the interpreter without having to go through a compilation process. Python can be used in many different fields including web development, data science, and artificial intelligence.
    If you don't know about APIs, I'd recommend checking these videos out:
    API Fetching with React - • How to Fetch APIs With...
    API Fetching with Python - • How to Fetch APIs with...
    My GitHub: github.com/arp...
    My Website: arpanneupane.com
    Background Music: • LAKEY INSPIRED - Warm ...
    My Programming Gear :
    Keyboard: amzn.to/42vXkxh
    Laptop: amzn.to/3CkAP3W
    Laptop Stand: amzn.to/3X116Oi
    Desk: amzn.to/43wmIEt
    Monitor: amzn.to/42BAaFH
    Monitor Arm: amzn.to/3NR0APS
    Chair: amzn.to/42vvKAn
    Desk Mat/Mousepad: amzn.to/43AhKqj
    Microphone: amzn.to/45RuQ43
    Headphones: amzn.to/445sf4R
    #Programming // #WeatherApp // #LearnToCode
  • Наука та технологія

КОМЕНТАРІ • 71

  • @sudeep812
    @sudeep812 3 роки тому +18

    Clean code and a very nicely explained.keep it up Arpan.

  • @ФёдорСмирнов-п1о

    Thank you for clear introduction to the weather app in python. I'll try myself to develop the fundamentals I got from this video

  • @Native_love
    @Native_love Рік тому +2

    Thank you! This worked! The other UA-cam videos by others had too many errors in them. Thank you!!!

  • @miltonneto2985
    @miltonneto2985 2 роки тому +4

    Thanks, your video helped me understand how to round numbers to decimals

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 роки тому

      👍

    • @yosef_ii
      @yosef_ii 2 місяці тому

      Wait what??

    • @miltonneto2985
      @miltonneto2985 2 місяці тому

      @@yosef_ii I couldn't understand how I rounded decimal numbers and my colleague's video helped me understand how

    • @yosef_ii
      @yosef_ii 2 місяці тому

      @@miltonneto2985 Yeah it's just rounding decimals give you integers and in your comment you said numbers to decimals which is reversed yk what i mean

    • @miltonneto2985
      @miltonneto2985 2 місяці тому +1

      @@yosef_ii True lol, I remember that day I was very stressed because I couldn't round the decimal numbers, I think that ended up causing this confusion 🤣

  • @newbie6449
    @newbie6449 10 місяців тому

    simple short and to the point info.
    Thanks man

  • @Wanetopia
    @Wanetopia Рік тому +7

    Nice!
    I'm a student In Kenya, this was very informative.
    I was wondering if there is a way we can merge this with Kotlin so that this data is displayed using beautiful, responsive UI on an android device...
    If you could do that on another video I'd really appreciate.
    Otherwise, thank you!

  • @GopiNath-uk8ib
    @GopiNath-uk8ib Рік тому

    Simple and Sweet 😊
    Thank You 😊

  • @fouadmaizar2914
    @fouadmaizar2914 3 роки тому +1

    Thanks man for the explanation.

  • @sixer-me6jz
    @sixer-me6jz Рік тому

    It very helpful in my development of my discord bot thanks bro!

  • @NNNedlog
    @NNNedlog 2 роки тому +1

    This is very nice. Thanks for sharing

  • @amossymindset
    @amossymindset 2 роки тому +1

    Thank you. Awesome!

  • @craigslistbuslistingsofnor6494
    @craigslistbuslistingsofnor6494 9 місяців тому

    Excellent video!

  • @saadalsaidy3712
    @saadalsaidy3712 5 місяців тому

    that was great thank you very much

  • @sudeep812
    @sudeep812 3 роки тому +1

    Very good !!!

  • @ausbirdy
    @ausbirdy 2 роки тому +1

    You are awesome!

  • @AHDD142
    @AHDD142 2 роки тому +1

    Thanks man. Do you know why it does not work this way please?: if weather_data.json()['cod'] != '200' like why it does work for 404 but not 200?

  • @declanmalone1279
    @declanmalone1279 2 місяці тому

    Pip install requests doesnt work for me in Windows. What is the exact command?

  • @NebaMcbright
    @NebaMcbright 5 місяців тому

    Please could you give me the name of the software you used to write the code and how it was possible for it to show in the browser.

  • @verycoolwaffle
    @verycoolwaffle 4 місяці тому

    The console says my api key is invalid when i print out the data.json

  • @emreboy0337
    @emreboy0337 11 місяців тому

    Could you please make a video in which you run this code in tkinter?? (or are you already have that?) I need that soo muchhh pleasee

  • @jabarhenv5933
    @jabarhenv5933 Рік тому

    I had to copy the http part straight from your github but why is it when I tried to copy and paste it from the weather app did it not give me the same url?

  • @rishabhgulecha4272
    @rishabhgulecha4272 Рік тому

    How do I change 10 digit time format to hour time such as sunrise or sunset? Thank you

  • @SamirDinkha-i9l
    @SamirDinkha-i9l Рік тому +1

    I am getting error code 401 Unauthorized, but I verified my e-mail. What do you think?

    • @Greglovesyoumore
      @Greglovesyoumore 11 місяців тому

      Same issue here, maybe we have to wait.

    • @lokesh5664
      @lokesh5664 8 місяців тому

      I am also getting error code 401 how to resolve it

    • @satadrunaskar8993
      @satadrunaskar8993 2 місяці тому

      ​@jamess.9930, was your issue solved ? Actually I contacted them and they are telling me to wait for a few hours.

  • @tw9756
    @tw9756 2 роки тому

    Confused about weather = weather_data.json()['weather'][0]['main']
    Why do we have to access this using a 0 index but everything else you can just call like how temp is done?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 роки тому +1

      Because you have to access the first index of the returned data in order to access the weather itself. You can see that in the data that is returned from the API if you send a GET request to that endpoint.

  • @lakshmipriya925
    @lakshmipriya925 2 роки тому +2

    Is is possible to run this code in IDLE PYTHON?

  • @quickenigma
    @quickenigma 2 роки тому

    Nice video😁😁
    One question when I put Celsius de result still in farenheit, how can I change it?

    • @fitze5899
      @fitze5899 Рік тому

      you can use the Farenheit to Celcius formula and then use that to change the value for the temperature before you print it out.

    • @yuryaraujo8325
      @yuryaraujo8325 Рік тому

      You can change line 14 to this: temp = round((weather_data.json()['main']['temp'] - 32) * (5 / 9))

    • @towkukus
      @towkukus Рік тому

      Line 8 of authors code is the URL to openweather. Replace units=imperial with units=metric

  • @Akash-rj8te
    @Akash-rj8te 3 місяці тому

    you did'nt explain the url

  • @Egsslereal
    @Egsslereal Рік тому

    PLEASE SAY HOW TO TRANSLATE WEATHER AND TEMP

  • @jaychou8430
    @jaychou8430 2 роки тому +1

    Where I can find my URL?

  • @sammmammm
    @sammmammm 8 місяців тому

    how to turn it into GUI

  • @olasojiemmanuel9132
    @olasojiemmanuel9132 Рік тому

    Please how did you get the url for the weather_data?

  • @tala_aa2993
    @tala_aa2993 Рік тому

    where is the url?

  • @anujdhanke
    @anujdhanke 6 місяців тому

    It shows KeyError : 'weather'

    • @AzimMukith
      @AzimMukith 2 місяці тому +1

      I get this error when I use the key that was given for my account. However, when I use the key in his github it works fine. Not sure why

  • @tmusic1001
    @tmusic1001 Рік тому +3

    I got 401. what to do

    • @lorddagf7978
      @lorddagf7978 Рік тому +2

      I don't know if you were able to figure it out but for me I had to wait about 10 minutes for api key to be enabled.

    • @tmusic1001
      @tmusic1001 Рік тому +3

      @@lorddagf7978 I did it thanks👌

    • @jorglopez4744
      @jorglopez4744 4 місяці тому

      How to solve this 401?

  • @priy3865
    @priy3865 9 місяців тому

    Thankyou so much it was very useful for me..✨🫰

  • @keswickbramwell4890
    @keswickbramwell4890 2 роки тому

    How do you get the URL that you insert?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  2 роки тому

      I copied and pasted it. You can go to the openweathermap.org to learn more about the API.