Package: weatheril
weatherilweatheril is an unofficialIMS(Israel Meteorological Service) python API wrapper.Features supportedGet current weather status.Get Daily and Hourly forecast (5 days ahead).Get Radar and Satellite images.Components and Frameworks used in weatherilLoguruRequestsPillowurllib3Getting startedUse git to clone or you can also manually download the project repository just as shown below;$gitclonehttps://github.com/t0mer/py-weatheril/
$cdpy-weatheril
py-weatheril$python3setup.pyinstallInstalling from PyPi# For Windowspipinstall--upgradeweatheril#For Linux | MACpip3install--upgradeweatherilWorking with the APIweatheril can be configured to retrive forecast information for specific location. when initiating the library you must set the location id and language (Currently only he and en are supported)fromweatherilimport*weather=WeatherIL(21,"he")In the above example i setRaananaas the location andHebrewas language. Full locations list in the table below.IdLocation1Jerusalem2Tel Aviv - Yafo3Haifa4Rishon le Zion5Petah Tiqva6Ashdod7Netania8Beer Sheva9Bnei Brak10Holon11Ramat Gan12Asheqelon13Rehovot14Bat Yam15Bet Shemesh16Kfar Sava17Herzliya18Hadera19Modiin20Ramla21Raanana22Modiin Illit23Rahat24Hod Hasharon25Givatayim26Kiryat Ata27Nahariya28Beitar Illit29Um al-Fahm30Kiryat Gat31Eilat32Rosh Haayin33Afula34Nes-Ziona35Akko36Elad37Ramat Hasharon38Karmiel39Yavneh40Tiberias41Tayibe42Kiryat Motzkin43Shfaram44Nof Hagalil45Kiryat Yam46Kiryat Bialik47Kiryat Ono48Maale Adumim49Or Yehuda50Zefat51Netivot52Dimona53Tamra54Sakhnin55Yehud56Baka al-Gharbiya57Ofakim58Givat Shmuel59Tira60Arad61Migdal Haemek62Sderot63Araba64Nesher65Kiryat Shmona66Yokneam Illit67Kafr Qassem68Kfar Yona69Qalansawa70Kiryat Malachi71Maalot-Tarshiha72Tirat Carmel73Ariel74Or Akiva75Bet Shean76Mizpe Ramon77Lod78Nazareth79Qazrin80En Gedi200Nimrod Fortress201Banias202Tel Dan203Snir Stream204Horshat Tal205Ayun Stream206Hula207Tel Hazor208Akhziv209Yehiam Fortress210Baram211Amud Stream212Korazim213Kfar Nahum214Majrase215Meshushim Stream216Yehudiya217Gamla218Kursi219Hamat Tiberias220Arbel221En Afek222Tzipori223Hai-Bar Carmel224Mount Carmel225Bet Shearim226Mishmar HaCarmel227Nahal Me‘arot228Dor-HaBonim229Tel Megiddo230Kokhav HaYarden231Maayan Harod232Bet Alpha233Gan HaShlosha235Taninim Stream236Caesarea237Tel Dor238Mikhmoret Sea Turtle239Beit Yanai240Apollonia241Mekorot HaYarkon242Palmahim243Castel244En Hemed245City of David246Me‘arat Soreq248Bet Guvrin249Sha’ar HaGai250Migdal Tsedek251Haniya Spring252Sebastia253Mount Gerizim254Nebi Samuel255En Prat256En Mabo‘a257Qasr al-Yahud258Good Samaritan259Euthymius Monastery261Qumran262Enot Tsukim263Herodium264Tel Hebron267Masada268Tel Arad269Tel Beer Sheva270Eshkol271Mamshit272Shivta273Ben-Gurion’s Tomb274En Avdat275Avdat277Hay-Bar Yotvata278Coral BeachGet Satellite and Radar Imagesfromweatherilimport*weather=WeatherIL(21,"he")images=weather.get_radar_images()The get_radar_images will retun an object with four lists:imsradar_images - Rain radar images (IMS).radar_images - Radar images.middle_east_satellite_images - Middel East weather sattelite images.europe_satellite_images - Eourope weather sattelite images.You can also create animateg gif from this images lists by using the create_animation method as follows:fromweatherilimport*weather=WeatherIL(21,"he")images=weather.get_radar_images()animated=images.create_animation(images=images.middle_east_satellite_images,animated_file="file.gif",path="/tmp")The function will return the path for the created image.OptionalYou can use the following function to create animated gifs for all imagesfromweatherilimport*weather=WeatherIL(21,"he")images=weather.get_radar_images()images.generate_images(path="Path to store the images")Get current weather status for given locationfromweatherilimport*weather=WeatherIL(21,"he")current=weather.get_current_analysis()The result will be a weather object containing the data requested:Location.Humidity.Rain.Temperature.Wind speed.Feels like.UV.TimeJson result"33":{"id":"1601809","lid":"33","forecast_time":"2023-01-25 16:00:00","type":"analysis","main_hour":"0","heat_stress":"17","relative_humidity":"58","due_point_Temp":"11","rain":null,"temperature":"20","wind_direction_id":"15","wind_speed":"2","wind_chill":"20","weather_code":null,"heat_stress_level":"0","feels_like":"20","min_temp":null,"max_temp":null,"modified":"2023-01-25 15:55:00","created":"2023-01-22 11:50:05","u_v_index":"0","u_v_level":"L","u_v_i_max":null,"u_v_i_factor":null}Get weather forecastfromweatherilimport*weather=WeatherIL(21,"he")forcats=weather.get_forecast()This method wil return forecast object that includes weather forecast for the new 5 days. The object contains data on Coutry level and also on give location Forecast >> Daily >> Hourly.classForecast:days:listclassDaily:date:datetimelocation:strday:strweather:strminimum_temperature:intmaximum_temperature:intmaximum_uvi:inthours:listdescription:strclassHourly:hour:strweather:strtemperature:int