Package: meteomoris
meteomorisget info about the weather in mauritius!pip install meteomorisVenv explanations at footer.Ubuntusudo add-apt-repository ppa:abdur-rahmaanj/meteomoris-ppa
sudo apt update
sudo apt-get install meteomorisImportant changesyear output removed from tides, added a meta label for year and monthExamplesNOTE: Addprint=Trueto get a tabular representation>>>frommeteomorisimport*>>>get_main_message()"A Strong Wind Warning and High Wave Warning for Mauritius | Aucun avertissement de cyclone n'est en vigueur a Maurice | Avertissement de fortes houles pour Rodrigues">>>get_main_message(links=True)[('The Mauritius Meteorological Services (Warnings) Regulations 2023','http://metservice.intnet.mu/about-us/legislations/'),('Heavy Rain warning Bulletin for Mauritius issued at 0500 hours on Thursday 19 January 2023, valid until 0500 hours  Friday 20 January 2023.','http://metservice.intnet.mu/warning-bulletin-special-weather.php')]>>>get_special_weather_bulletin()SpecialWeatherBulletinThu,Jan19,2023HeavyRainwarningBulletinforMauritiusissuedat0500hoursonThursday19January2023,validuntil0500hoursFriday20January2023.HeavyrainwarningisinforceinMauritiusActivecloudscomingfromtheNorth-Eastareinfluencingthelocalweather.Moderatetoheavyshowerswiththunderstormsareexpectedovertheisland.Thepublicisadvisedto:1.Remaininsafeplacesandavoidopenareas,hikings,seaventuresandshelteringundertreesduringthunderstorms.2.Avoidplacespronetowateraccumulation,riverbanksandotherwatercourseswhicharefloodedandcertainmountainslopespronetolandslide3.Beverycautiousontheroadsduetoreducedvisibilityresultingfromheavyrainsandfogpatches...>>>get_weekforecast()[{'condition':'Few showers highgrounds','date':'Apr 22','day':'Mon','max':'32�','min':'21�','probability':'High','sea condition':'rough','wind':'E25G50'},{...}]>>>get_weekforecast(print=True)Weekforecast┏━━━━━┳━━━━━━━━┳━━━━━┳━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━┓┃Day┃Date┃Min┃Max┃Condition┃Seacondition┃Wind┃┡━━━━━╇━━━━━━━━╇━━━━━╇━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━┩│Thu│Jan19│19°│30°│Moderatetolocallyheavyshowerswithisolatedthunderstorms│rough│ENE25G50││Fri│Jan20│20°│30°│Moderatetolocallyheavyshowerswithisolatedthunderstorms│rough│NE20││Sat│Jan21│20°│30°│Moderateshowerswithisolatedthunderstorms│moderate│NE20││Sun│Jan22│20°│30°│Moderateshowerswithisolatedthunderstorms│moderate│N15││Mon│Jan23│20°│30°│Moderatetoheavythunderyshowers│rough│N15││Tue│Jan24│20°│30°│Moderatetoheavythunderyshowers│rough│N20││Wed│Jan25│20°│30°│Moderatetoheavythunderyshowers│rough│N25│└─────┴────────┴─────┴─────┴───────────────────────────────────────────────────────────────┴───────────────┴──────────┘>>>get_weekforecast(day=3){'condition':'Few passing showers','date':'Apr 25','day':'Thu','max':'31�','min':'20�','probability':'Medium','sea condition':'moderate','wind':'SE20'}>>>get_weekforecast(day=3)['condition']'Few passing showers'>>>get_cityforecast()[{'condition':'Partly cloudy','date':'Apr 22','day':'Mon','max':'31�','min':'26�','wind':'E25G50'},{'condition':...}]>>>get_moonphase(){'April 2019':{'first quarter':{'date':'12','hour':'23','minute':'06'},'full moon':{'date':'19','hour':'15','minute':'12'},'last quarter':{'date':'27','hour':'02','minute':'18'},'new moon':{'date':'05','hour':'12','minute':'50'}},'May 2019':{'first quarter':{'date':'12','hour':'05','minute':'12'},...>>>may=get_moonphase(month='May 2019')>>>may['new moon']['date']'05'>>>get_sunrisemu(){'february':{1:{'rise':'05:53','set':'18:53'},...28:{'rise':'06:07','set':'18:37'}},'march':{1:{'rise':'06:07','set':'18:36'},2:{'rise':'06:07','set':'18:36'},...31:{'rise':'06:16','set':'18:11'}}}>>>get_sunriserodr()>>>get_sunrisemu().keys()dict_keys(['february','march'])>>>get_eclipses()[{'end':{'date':1,'hour':2,'minute':37,'month':'may'},'info':'The eclipse will not be visible in Mauritius, Rodrigues, St. Brandon and Agalega.','start':{'date':30,'hour':22,'minute':45,'month':'april'},'status':'partial','type':'sun','title':''},...{'end':{'date':8,'hour':17,'minute':56,'month':'november'},'info':'The eclipse will not be visible in Mauritius, Rodrigues, St. Brandon and Agalega.','start':{'date':8,'hour':12,'minute':2,'month':'november'},'status':'total','type':'moon','title':''}]>>>get_equinoxes()[{'day':20,'hour':19,'minute':33,'month':'march','year':2022},{'day':23,'hour':5,'minute':3,'month':'september','year':2022}]>>>get_solstices()[{'day':21,'hour':13,'minute':13,'month':'june','year':2022},{'day':22,'hour':1,'minute':48,'month':'december','year':2022}]>>>get_tides(){'months':{'january':{1:['09:27','59','23:37','58','03:27','41','16:55','30'],...},'february':{1:['00:36','63','10:49','58','06:12','49','18:21','28'],...}},'month_format':{'date':['1st High Tide (Time (Local))','1st High Tide (Height (cm))','2nd High Tide (Time (Local))','2nd High Tide (Height (cm))','1st Low Tide (Time (Local))','1st Low Tide (Height (cm))','2nd Low Tide (Time (Local))','2nd Low Tide (Height (cm))']},'meta':{'months':[['january','2023'],['feruary','2023']]}}>>>get_latest(){'rainfall24h':{'info':'Rainfall in (mm) from 28 January 2023 10 PM  to 29 January 2023 10 PM','data':{'Albion':'',...'Vacoas':'2.3'}},'rainfall3hrs':{'info':'Last 3hrs Rainfall in (mm) on 29 January 2023 10 PM.','data':{'Albion':'',...'Vacoas':'0.5'}},'wind':{'info':'Maximum wind speed (km/h) for the last 24 hours until 29 January 2023','data':{'Albion':'',...'Vacoas':'24'}},'humidity':{'info':'Humidity at 10 AM on 29 January 2023','data':{'Albion':'',...'Vacoas':'72'}},'minmaxtemp':{'info':'Maximum and minimum temperatures for the last 24 hours until 29 January 2023','data':{'Albion':{'min':'','max':''},...'Vacoas':{'min':'22','max':'29'}}}}>>>get_uvindex(){'vacoas':'Extreme','port-louis':'Extreme','plaisance':'Low'}>>>get_today_moonphase()# {} if nothing today{'title':'first quarter','hour':22,'minute':39}>>>get_today_eclipse()# {} if nothing today{'start':eclispe_json,'end':eclipse_json}>>>get_today_sunrise("mu"){'rise':'05:53','set':'18:53'}>>>get_today_forecast(){'condition':'Few passing showers','date':'Apr 25','day':'Thu','max':'31�','min':'20�','probability':'Medium','sea condition':'moderate','wind':'SE20'}>>>get_today_tides()['09:27','59','23:37','58','03:27','41','16:55','30']>>>get_today_solstice(){'day':21,'hour':13,'minute':13,'month':'june','year':2022}>>>get_today_equinox(){'day':20,'hour':19,'minute':33,'month':'march','year':2022}CliUsage: meteomoris [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  forecast     Week forecast
  message      Message of the day
  moonphase    Moonphase
  special      Special weather bulletin
  sunrisemu    Sunrise (Mauritius)
  sunriserodr  Sunrise (Rodrigues)
  today        Today's info
  uvindex      Ultra Violet IndexGlobal settingsfrommeteomorisimportMeteofrommeteomorisimportget_main_messageMeteo.CHECK_INTERNET=True# Will check if there is internetMeteo.EXIT_ON_NO_INTERNET=True# Will exit if no internetMeteo.ALREADY_CHECKED_INTERNET=FalseMeteo.DEBUG=False# used during developmentMeteo.CACHE_PERMS=True# used internally, modify to refelct if cache file can be createdMeteo.CACHE_PATH="."# If cache path can be customized, default to  site-packagesMeteo.today="2023-11-10"# If you want to override cache dataMeteo.headers={'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0','Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8','Accept-Language':'en-US,en;q=0.5','Accept-Encoding':'gzip','DNT':'1',# Do Not Track Request Header'Connection':'close','Sec-GPC':'1','Sec-Fetch-Site':'none','Sec-Fetch-Mode':'navigate','Sec-Fetch-User':'?1','Connection':'keep-alive','Upgrade-Insecure-Requests':'1'}# Redefine default headers hereprint(get_main_message())InstallingCreate and activate envLinuxpython3.9 -m venv venv
. venv/bin/activateWindowspy -3.9 -m venv venv
venv\Scripts\activate.bat :: for command prompt
venv\Scripts\Activate.ps1 :: for powershellLocal devIn envpip install -e .Local testIn envInstall pytestpip install pytestRunpython -m pytest tests/Changelog2.12.1
🔧 Fix: Add remaining get_today apis to init
✨ Fix: Improve get_tides parsing mechanism to be more robust

2.12.0
🎉 get_today_solstice
🎉 get_today_equinox

2.11.0
🎉 get_today_sunrise
🎉 get_today_forecast
🎉 get_today_tides

2.10.0
🎉 get_today_moonphase
🎉 get_today_eclipse

2.9.0: 🎉 Add version cli command

2.8.8
🔧 Set cache path to current directory
🖌️ Rearrange display of today command
🔧 Remove latest data from cache as need last 3hrs

2.8.7
🔧 Lots of fixes
🔧 Tests
🎉 Customizable cache path

2.8.3: 🔧 Fix key error
2.8.2: 🔧 Fix imports
2.8.4: ✨ Feat resist cache permission issues
2.8.5: 🔧 Fix cache not found on perms error
2.8.6: 🔧 Fix none error on no cache data
2.8.1: 🔥 Feat cache
2.8.0: 🎉 Add UV index

2.7.8
🔧 Fixes
🛩️ Debian package published

2.7.0
🎉 Add latest data in API
🎉 Add today command

2.6.0
🎉 Add tide
🎉 Add rainfall 

2.4.0: 🎉 Add today info
2.3.3: 🔧 Fix broken install

2.3.0
🔧 Fix get_eclipse_raw bug
✨ Add debug mode

2.2.1: 🔧 Fix get_moonphase bug
2.2.0: 🎉 Add print commands and API

2.1.0
🔧 Fix get_moonphase
🎉 Add get_equinoxes
🎉 Add get_solstices
🎉 Add get_equinoxes

2.0.2: 🔧 Fix broken install

2.0.1
📑 Add venv docs
📑 Add global settings docs

2.0.0
🎉 Add Meteo with classmethod
🎉 Add internet check
🎉 Add global settings
🎉 Add headers change option
🎉 Add get_sunrisemu
🎉 Add get_sunriserodr
🔧 Tests basicsDebianExample~/code/meteomoris/$ debuild -k"<key id>" -S
~/code/meteomoris/$ cd ..
~/code/$ dput ppa:abdur-rahmaanj/meteomoris-ppa meteomoris_2.7.8_source.changes