Package: ims-envista
IMS Envista==========================ims_envistais an unofficial IMS (Israel Meteorological Service) python API wrapper for Envista service.Features supportedGet latest meteorological readings from IMS EnvistaGet measurement data by region, station and date range.Get Daily and Monthly readings by measurement station.Components and Frameworks usedLoguruRequestsurllib3Installingpip3install--upgradeims-envistaWorking 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)Getting an IMS TokenYou can read about the API and about how to get a tokenhere- signing terms of use, etc.fromims_envistaimportIMSEnvista# Create IMS object with Tokenims=IMSEnvista("2cc57fb1-cda5-4965-af12-b397e5b8eb32")# Get JERUSALEM stations for getting an id[stationforstationinims.get_all_stations_info()ifstation.name.startswith("JERUSALEM")]>[JERUSALEMGIVATRAM(22)-Location:[Lat-31.771/Long-35.197],Active,Owner:ims,RegionId:7,Monitors:[Rain(mm),WSmax(m/sec),WDmax(deg),WS(m/sec),WD(deg),STDwd(deg),TD(degC),RH(%),TDmax(degC),TDmin(degC),Grad(w/m2),DiffR(w/m2),WS1mm(m/sec),Ws10mm(m/sec),Time(hhmm),NIP(w/m2)],StationTarget:,JERUSALEMCENTRE(23)-Location:[Lat-31.781/Long-35.222],Active,Owner:ims,RegionId:7,Monitors:[Rain(mm),WSmax(m/sec),WDmax(deg),WS(m/sec),WD(deg),STDwd(deg),TD(degC),TDmax(degC),TDmin(degC),WS1mm(m/sec),Ws10mm(m/sec),Time(hhmm),BP(mb),RH(%)],StationTarget:,JERUSALEMCENTRE_1m(248)-Location:[Lat-31.7806/Long-35.2217],Active,Owner:ims,RegionId:7,Monitors:[Rain_1_min(mm),Rain_Corr(mm)],StationTarget:,JERUSALEMGIVATRAM_1m(249)-Location:[Lat-31.7704/Long-35.1973],Active,Owner:ims,RegionId:7,Monitors:[Rain_1_min(mm),Rain_Corr(mm)],StationTarget:]# Get latest data by a station idims.get_latest_station_data(23)>Station(23),Data:[Station:23,Date:2023-02-2112:00:00+02:00,Readings:[(TD:17.6°C),(TDmax:17.8°C),(TDmin:17.5°C),(RH:58.0%),(Rain:0.0mm),(WS:2.8m/s),(WSmax:3.7m/s),(WD:285.0deg),(WDmax:289.0deg),(STDwd:10.5deg),(WS1mm:3.4m/s),(WS10mm:2.9m/s)]]MethodsMethodDescriptionParametersReturnsget_latest_station_dataGet Latest Station Readingsstation_id: int,(optional) channel_id: intStationMeteorologicalReadingsget_earliest_station_dataGet Earliest Station Readingsstation_id: int,(optional) channel_id: intStationMeteorologicalReadingsget_station_data_from_dateGet Station Reading from a specific datestation_id: int,date: datetime,(optional) channel_id: intStationMeteorologicalReadingsget_station_data_by_date_rangeGet Station Readings from a date rangestation_id: int,from_date: datetime,to_date: datetime,(optional) channel_id: intStationMeteorologicalReadingsget_daily_station_dataGet Daily Station Readingsstation_id: int,(optional) channel_id: intStationMeteorologicalReadingsget_monthly_station_dataGet Monthly Station Readingsstation_id: int,(optional) channel_id: int,(optional) month: str, [e.g. 03](optional) year: str [e.g. 2020]StationMeteorologicalReadingsget_all_stations_dataGet Station Info of all stationslist[Station]get_station_dataGet Station Info by station_idstation_id: intStationget_all_regions_dataGet Region Info of all regionslist[Region]get_region_infoGet Region Info by region_idstation_id: intRegionget_metric_descriptionsGet Station Measurements DescriptionlistIMSVariableLocal DevelopmentClone from GithubClone the repo from GitHubgit clone git@github.com:GuyKh/ims-envista.gitRequirementsPackage requirements are handled using pip. To install them dopip install -r requirements.txtLocal InstallationTo install locally:python setup.py installTestsTesting is set up usingpytestand coverage is handled
with the pytest-cov plugin.Run your tests withpy.testin the root directory.Coverage is ran by default and is set in thepytest.inifile.
To see an html output of coverage openhtmlcov/index.htmlafter running the tests.