✅ In 5 steps | Using weather api in Python to get weather-report of any place | Python project API

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ • 197

  • @Odinwain
    @Odinwain 3 роки тому +7

    Wow thank you for taking the time to explain this video, Now I wish my professors gave this good of instructions!

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

    LOVE your explanation Brother i totally understand the concept .... just amazing

  • @022_ananyasrivastava8
    @022_ananyasrivastava8 3 роки тому +2

    Usually I don't comment. But this is something which I found mind-blowing. Hatts off

    • @aipython
      @aipython  3 роки тому

      Thank you so much for your fantastic word. It gives a lot of boost to do more such work. 👍

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

      @@aipython Can u plz tell how can I design GUI for this project

    • @aipython
      @aipython  3 роки тому

      You can use either Tkinter or pyqt5 to create a GUI in python and assign the buttons with corresponding api call. You could check out on my channel- project for covid 19 vaccine availability checker. ua-cam.com/play/PLBeeFF3JmXWA-l4xv2TyCU1DnJGsoHseJ.html

  • @mike87364
    @mike87364 Рік тому +1

    this is what ive been looking for, great explanation!!

  • @kumaravinashsinghabnish4021
    @kumaravinashsinghabnish4021 Рік тому +1

    Woww amazing 🎉 The concept amazing, everyone used to directly write the code but you are really amazing, feeling like i am making it by myself woww🎉

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

      I am glad it helped you.

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

    Best explanation available on the internet for beginners 💝🤝🤝

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

      Great to hear this from you

  • @BluePhantomStudio
    @BluePhantomStudio 3 роки тому +3

    Now I can implement it in my Voice Assistant thanks

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

    thanks alot for explaining it in slow pace and using simpler terms bro

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

      I am glad it helped you. Thanks 🙏

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

    your voice so soothing. Thanks for this video. I am using this in my project now

    • @aipython
      @aipython  3 роки тому

      Nice to hear that 😊

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

      Can u help me
      I have error in this project

    • @aipython
      @aipython  3 роки тому

      Can you please let me know what is the error??

  • @cweeperyt
    @cweeperyt 4 роки тому +4

    Very good Video! Thank you for explaining👍

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

    Very helpful. Thank you so much for posting this.

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

      Glad , it helped you

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

    I like your voice and the way you describe thank you

  • @ramdevakumar7811
    @ramdevakumar7811 4 роки тому +7

    This is a pretty good video. Thank you for the amount of effort you put in it.

    • @aipython
      @aipython  4 роки тому

      Thank you for such a nice feedback. This is motivating to do more.

    • @ramdevakumar7811
      @ramdevakumar7811 4 роки тому +1

      @@aipython I would recommend doing a video on another api.

    • @aipython
      @aipython  4 роки тому

      We are working on it, by the way would you like us to make video on any specific api service. Anything in your mind?

    • @ramdevakumar7811
      @ramdevakumar7811 4 роки тому

      @@aipython No not really.

  • @EchoPlay-n1f
    @EchoPlay-n1f Рік тому +1

    you are the best man thanks so much

  • @moneeshkumar1838
    @moneeshkumar1838 3 роки тому

    Great Video Man, Keep Posting

  • @raunaksaluja6878
    @raunaksaluja6878 Рік тому +1

    Awesome ❤❤❤❤

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

    when i running the code the keyerror is "API "key line
    please solve this problem (string number 5)

  • @rutujanalawade2689
    @rutujanalawade2689 4 роки тому +1

    Well explained video. thank you sir

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

    Great video
    You deserve a like and a sub

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

    key error = "main" what should I do?

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

    Thank you so much you saved my final semester project ❣️❣️❣️❣️❣️☺️☺️☺️☺️☺️❣️☺️❣️❣️❣️☺️❣️❣️

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

      Great, it worked for you.

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

      Yes for that reason i message you on Instagram but i got my output after that

  • @rakshith9584
    @rakshith9584 3 роки тому +2

    Hlo sir I am getting KeyError: 'main' from temp_city please telll me what to do

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

      Hi Rakshith,
      I have seen your email, there you have just attach the error portion. Can you send your complete code alongwith the error details. I will debug and let you know the solution.
      Keep learning and keep growing!!

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

      @@aipython thank you sir I have sent you the email

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

      @@rakshith9584 even I am geting the same error , do you know how to remove it ?

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

    What actually written in current_weather_data in environment variable ?plz tell me .

    • @aipython
      @aipython  3 роки тому

      You need to obtain a API key from openweathermap website and put it there in environment field

    • @code_with_ali_09
      @code_with_ali_09 3 роки тому

      @@aipython Ok Tnx👍

  • @Anitakumari-hx4tl
    @Anitakumari-hx4tl 3 роки тому

    Awesome explanation 👍

  • @jaytaro._fx4725
    @jaytaro._fx4725 5 місяців тому +1

    does this require an internet connection>?

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

      Yes of course, to fetch the data over API

    • @jaytaro._fx4725
      @jaytaro._fx4725 5 місяців тому

      @@aipython ok thanks

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

    Why [0] is added to access sub elements of weather ? You haven't used the same rule to access sub elements of MAIN

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

      Where exactly in the code, any line number?

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

      @@aipython Line No. 20 Weather [0]
      Line No 21... no zero. Here sub element is accessed without [0].
      Thank you for the prompt response.

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

    Brother can you explain me i'm first year student how to start and implement this project which text editor or what i need to build this project

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

      You can follow the videos and use any code editor you are familiar with. Incase you are starting fresh then consider VS code and python version 3.9 or above.

  • @rjdadagaming9886
    @rjdadagaming9886 Рік тому +1

    do you have a weather forecast project report

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

    thanks you but while i am running it its saying: KeyError: 'current_weather_data'

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

      That means, Python is not able to locate "current_weather_data" in the environment variable. You need to create such variable and assign the API key to it.. it is clearly explained in the video

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

      @@aipython ok thank you :D

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

    The open weather map API has changed it's API call, will this video work there as well?

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

      Hey Krunal, to be very frank, I haven't seen the new api structure. I will confirm you after verification. Give me some time

  • @wernerdebarros
    @wernerdebarros 4 роки тому +1

    How can i do a graph with quiver forecast like windy?

    • @aipython
      @aipython  4 роки тому +1

      I am not sure, if I understand you correctly. Did you mean to plot a graph for windy weather showing over some range let say 1 day or 2.

    • @wernerdebarros
      @wernerdebarros 4 роки тому

      @@aipython Hey, I am try to do a graph like windy with fews files netcdfs. Can i send email, linkedin or whatsapp?

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

    HOW CAN I FIX THIS ModuleNotFoundError: No module named 'requests'

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

      Have you installed the requests module along with python?

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

      Where can i download that?

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

      You can refer to this video: ua-cam.com/video/5V713heaUE8/v-deo.html

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

      @@aipython will i download all ?

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

      Not exactly, only requests is required

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

    Can we show this Jeson data into Web browser in Graphical way ? Please reply how ?

    • @aipython
      @aipython  3 роки тому

      You can view JSON data in web browser using a plugin called json formatter. Video link: ua-cam.com/video/99UUOxhiyDk/v-deo.html
      I am not sure about displaying the same in Graphical format. You can search some online json viewer

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

    thank you for the good video, while i have a question about about the used api. can it let us to get the precipitation value and the soil moisture value or it is just used to get the temprature, humidity and speed values?

    • @aipython
      @aipython  4 роки тому +1

      Hey Najla,
      Thank you for liking the video. I am not sure if it would give you the soil moisture, as it would require a dedicated sensor to be placed inside the soil at each specific location (trust me it's a very very tedious task for any organisation). But I am sure that api must have precipitation value. Best of luck and let me know for any other help.

    • @najlafattouch5208
      @najlafattouch5208 4 роки тому

      @@aipython thank you so much for your generosity :)

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

    Sir can we convert this into an app for Android??

  • @satyamgupta449
    @satyamgupta449 3 роки тому +2

    Hello aipython, I wanted to develop a project that is a weather prediction system. I wanted to ask that how can I predict weather in upcoming days that whether it will be sunny or cloudy or what will be the temperature and all?

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

      Yes, definitely you can build one such app. So the idea is pretty simple and can be implemented easily using Machine learning (specifically using Decision Tree). You can build model by aggregating past 4-5 year data of a place. Build a ML model and save the output of model result in a file and finally create GUI to display the future prediction.

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

    when I run my code and give it my city it returns '400',i searched it and it means bad request! I don't know what to do
    plsss heeelp

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

    Bro the code is not running instead its showing : raise KeyError(key) from None
    KeyError: 'current_weather_data'
    Plzz helpp!!

    • @aipython
      @aipython  3 роки тому

      It is straight forward, you have not created any variable with the name 'current_weather_data' in the environment variable.
      Please create one with this name and add your api key in the value field.

  • @Real_Germany
    @Real_Germany 3 роки тому

    Should we put API key in brackets or nt

  • @latha383
    @latha383 Рік тому +1

    THANK YOU ❤️

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

    Hi... I keep getting this error and I have no clue why. Could anybody help?
    Traceback (most recent call last):
    File "c:\Users\*****\OneDrive\Documents\lol.py", line 26, in
    user_api = os.environ['current_weather_data']
    File "C:\Program Files\Python310\lib\os.py", line 679, in __getitem__
    raise KeyError(key) from None
    KeyError: 'current_weather_data'
    Thanks

    • @aipython
      @aipython  3 роки тому

      Hello, It seems like you have not created any variable having a name as 'current_weather_data' in the environment variable. Please make sure to create this variable and paste the api key in the value field of the same environment variable.

    • @aipython
      @aipython  3 роки тому

      You can refer to this video - ua-cam.com/video/bcYKKX3ljlE/v-deo.html , for creating environment variable and assign a value to it

    • @Pot4to_
      @Pot4to_ 3 роки тому

      @@aipython tysm

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

    Can i use jupyter notebook (anaconda3) to run this?

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

    Finally found a good video

  • @NameisAizen
    @NameisAizen 4 роки тому +1

    Which flatform you run the program

    • @aipython
      @aipython  4 роки тому

      I am using Notepad++ to execute Python code. Here is the video, which explain how to use Notepad++ for Python. ua-cam.com/video/yxTbSTrCn6I/v-deo.html

    • @NameisAizen
      @NameisAizen 4 роки тому

      I getting syntax error

    • @NameisAizen
      @NameisAizen 4 роки тому

      8 th line....got error

    • @NameisAizen
      @NameisAizen 4 роки тому

      I am doing project on weather api using machine learning.... could you please help me sir

    • @aipython
      @aipython  4 роки тому

      Share the error screenshot at aipython.india@gmail.com

  • @sakibrahim8399
    @sakibrahim8399 3 роки тому +2

    can we use pycharam sir

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

      Yes, Sakib.
      You can definitely use pycharm or any other IDE

    • @sakibrahim8399
      @sakibrahim8399 3 роки тому

      Sir I have run the project but error shows
      raise keyerro(key)from none

  • @anshugulati9165
    @anshugulati9165 4 роки тому +1

    i am given a project on weather forecasting but not an app based but web based ,i think this one u showed would be considered as app based so can u please suggest me what could i do for it.

    • @aipython
      @aipython  4 роки тому +1

      Hi Anshu,
      You can build an front end (web app) using either flask or electron Js and keep this code at the back end. Display the result on that app.

  • @dipankarpanda8414
    @dipankarpanda8414 3 роки тому

    Awesome video..

  • @Real_Germany
    @Real_Germany 3 роки тому

    In which app u r running this problem? It's showing no module name requests

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

    isnt working. the site has changed completely can't generate api keys.

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

    Very good video! Is there a possibility to get the weather of a place for 2014?

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

      Thank you.
      I would say yes, there is possibility to get weather info from past , if the api stores previous data as well. I will check and update you.

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

    Sir how to get output in simple notepad for this code?

    • @aipython
      @aipython  3 роки тому

      Yes, you can write the information in a text file and that can be done pretty easily.

  • @logics8529
    @logics8529 4 роки тому

    keep it up bro

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

    Hey bro can you please share the synopsis or project report of this..

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

      Sorry, Its not available right now

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

    can we use this project in our final year....

    • @aipython
      @aipython  3 роки тому

      Yes, of course go ahead and take all the code available on our website www.aipython.in

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

    How can I see how much it has rained today?

    • @aipython
      @aipython  3 роки тому

      You can check, if such information is available within the response provided by API service provider. If they are providing such data , well than good news is you can get it too.

  • @vildaalita4878
    @vildaalita4878 4 роки тому

    Sorry im beginner in python, how ur spyder move to python374? And how to run the command? Please help

    • @vildaalita4878
      @vildaalita4878 4 роки тому

      Sorry u use spyder or notepad++?

    • @aipython
      @aipython  4 роки тому +1

      It is Notepad++

    • @vildaalita4878
      @vildaalita4878 4 роки тому

      @@aipython but how to running the command to python?

    • @aipython
      @aipython  4 роки тому

      I have explained in the video step by step. Do let us know , at what point you are getting issue.

    • @RahulKumar-px5jl
      @RahulKumar-px5jl 4 роки тому +1

      Congrats

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

    very nice

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

    Can we save this data into csv

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

      Yes, ofcourse
      We can save all the data into Excel sheet using openpyxl module

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

    are u store some data in api-user r not

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

    how to run the code at 10:16 ?

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

      You can use task scheduler or deploy it on Heroku cloud for free. Check my other video for detailed guide.

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

    can we get monthly data by this API ...plz ansr asap....thank you.

    • @aipython
      @aipython  3 роки тому

      Of course, why not.. you can get historical data in various forms BUT not via this API. openweathermap provided many other API to facilitate data delivery.

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

    😢 I am getting error due to 11th and 12th line. Terminal saying no such file or directory

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

    Osm

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

    How do I get the date and time for the timezone of the city we are searching for?

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

      You can't get the time and date by using the OpenWeatherMap API.
      To get time and date for a specific timezone you gotta use two additional libraries called pytz and datetime.
      To specify the timezone you are looking for, do:
      tz = pytz.timezone('Europe/Berlin')
      berlin_now = datetime.now(tz)
      the string called "tz" specifies the timezone you are looking for.
      the string called "berlin_now" get's the information by using the "tz" string above.
      Now you just have to do >>> print(berlin_now)

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

      Superb, well explained. Thank you so much HolyCow ,🙏

  • @caldanmeshach401
    @caldanmeshach401 4 роки тому +1

    What is the algorithm for this?

    • @aipython
      @aipython  4 роки тому

      This is based upon RESTAPI

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

    is there any PPT related to this project if available then please provide the link

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

      Sorry, we don't have any PPT :(

  • @sanjeevkumar-ub4sv
    @sanjeevkumar-ub4sv 3 роки тому

    @AIPYTHON Sir I am getting error
    raise Key error(key) form None
    In line ** user_Api line ** even I have passed same name that I have of Api key

    • @aipython
      @aipython  3 роки тому

      Can you send the screenshot with code to aipython.india@gmail.com

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

    Bro iam getting keyError:'main'
    temp_city=((api_data['main']['temp'])
    How to resolve it

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

      same error in line number 13 please provide solution

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

    I m getting keyerror in main temp

    • @aipython
      @aipython  3 роки тому

      Can you share the code and the error screenshot to aipython.india@gmail.com

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

    sir plese help me ..i have an error...

    • @aipython
      @aipython  3 роки тому

      Have you shared your error screenshot to aipython.india@gmail.com

    • @tonightspecial7
      @tonightspecial7 3 роки тому

      @@aipython i have send screen sort..please chek your gmail sir.

    • @tonightspecial7
      @tonightspecial7 3 роки тому

      sir plese chek your mail..🙂

    • @aipython
      @aipython  3 роки тому

      @@tonightspecial7 Certainly, there is an issue with reading the information from the windows environment variable. YOu can watch this video for the solution of your problem ua-cam.com/video/bcYKKX3ljlE/v-deo.html

  • @kazimrizvi486
    @kazimrizvi486 4 роки тому

    You are Amazing

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

    Where to run the code sir can u explain

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

      You can execute code in any IDE of your choice preferably VS Code.

  • @Hail_Jesus
    @Hail_Jesus Місяць тому +1

    Jesus loves you so much brother. It’s not about religion but a relationship with the true and living God. He will give you so much peace and joy in your life. Ask him to reveal yourself to you in prayer and He will. If you confess with your mouth that Jesus Christ is Lord and believe in your heart that God raised Him from the dead you will be saved.

  • @rainyvideo6936
    @rainyvideo6936 4 роки тому +1

    where can i find the source code?

    • @aipython
      @aipython  4 роки тому +3

      You can find the source code for all my project related videos at aipython. www.aipython.in/python/python-projects/

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

    can you do this in kivy

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

      No idea about kivy.

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

    I have user-api key error How to fix

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

      You need to create an account and generate user api key. Keep this api key in environment variables and use it in programming

  • @RADharani-yt8sx
    @RADharani-yt8sx 3 роки тому +1

    Actually I want a weather forecasting project using spring framework will you please help me with that

    • @aipython
      @aipython  3 роки тому

      Hi Dharani,
      I can help you with python but no idea about spring.

  • @simarkaur6977
    @simarkaur6977 3 роки тому

    can you show the same method on linux?

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

    17:52
    my mind ......

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

    sir can u send coding file

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

    bro how can we save this data in .txt file using requests
    can u just tell me the code

    • @aipython
      @aipython  3 роки тому

      You can save the complete JSON response data in text or CSV file using file.write(filename.txt, 'w+')

  • @sauravvg1359
    @sauravvg1359 4 роки тому +1

    Bro can you share all these codes as a file

    • @aipython
      @aipython  4 роки тому

      Hi Sauravv,
      You can find the complete documentation as well as the code at our website www.aipython.in/python/python-projects/

  • @suryavamsichilukuri7475
    @suryavamsichilukuri7475 4 роки тому +1

    Bro can u give that code plz

  • @rakshith9584
    @rakshith9584 3 роки тому +2

    Sir I have sent you the pic of my error plz do check it out

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

      Sir did you get the solution for the error

    • @aipython
      @aipython  3 роки тому

      I will connect with you... Can you share your contact number via email

  • @siddu6825
    @siddu6825 7 місяців тому

    Tq

  • @AnuTvme
    @AnuTvme 11 місяців тому +1

    can you assist me for some time

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

      Hi,
      Share your contact details on aipython.india@gmail.com

  • @zilizotufikia946
    @zilizotufikia946 4 роки тому

    Response401