Package: robotframework-openweathermap
robotframework-openweathermaprobotframework-openweathermapis aRobot Frameworkkeyword collection for theOpenWeatherMapAPI.InstallationThe easiest way is to install this package is from pypi:pip install robotframework-openweathermapRobot Framework Library ExamplesPrerequisites:The accompanying Robot Frameworktest filerelies on two requirements:get an OpenWeatherMap API key(it's free)create an environment variableOWM_API_KEYand assign the OpenWeatherMap API key to that variableExecute test withrobot keyword_checks.robotLibrary usage and supported keywordsDefault settingsThe following rules apply:The default value for each parameter isNoneEach parameter supportsGetterandSetterkeywords, e.g,Set OpenWeatherMap LatitudeEach OpenWeatherMap Keyword also permits the usage of these parameters. Example:Get Current Weather   latitude=....A keyword's parameter value has priority over theSettervalue. This means that if you useSet OpenWeathermap Latitude  10andGet Current Weather  latitude=20, the value from the OWK Keyword will supersede theSetterkeyword and a value of20is going to be used.Options for setting the parameter valuesYou can either specify all parameters during the initial setup of the library or alternatively via separate keywordsOption 1 - set as position parameters*** Settings ***

Library  OpenWeatherMapLibrary  51.82798  9.4455  ...

*** Test Cases ***
My first test caseOption 2 - set as named parameters*** Settings ***

Library  OpenWeatherMapLibrary  latitude=51.82798  longitude=9.4455  ...

*** Test Cases ***
My first test caseOption 3 - Use Robot KeywordsSet OpenWeatherMap Latitude   latitude=51.82798Generic Getter / Setter Robot Keywords supported by this libraryYou can use these optional Getter/Setter methods for setting your fixed default values. If you specify the same parameter as part of the actual OpenWeatherMap keyword, the value specified with that API call supersedes these generic Getter/Setter values.KeywordDescriptionArgumentsValid ValuesGet/Set OpenWeatherMap LatitudeGets / Sets the latitude valuelatitudefloat valueGet/Set OpenWeatherMap LongitudeGets / Sets the longitude valuelongitudefloat valueGet/Set OpenWeatherMap API KeyGets / Sets the OWM API KeyapikeystringGet/Set OpenWeatherMap Number Of ResultsGets / Sets the max number of resultsnumberinteger > 0Get/Set OpenWeatherMap LanguageGets / Sets the desired output languagelanguageseeOpenWeatherMap APIfor valid valuesGet/Set OpenWeatherMap ExcludesGets / Sets the exclude(s) value.Separarate multiple values with a commaSeeAPI documentationfor detailsexcludecurrentminutelyhourlydailyalertsGet/Set OpenWeatherMap Output FormatGets / Sets the output format (e.g.json)output_formatjsonxmlhtmlGet/Set OpenWeatherMap Unit FormatGets / Sets the unit formatSeeAPI Documentationfor detailsFormat availability depends on API callunit_formatstandardmetricimperialGet/Set OpenWeatherMap Datetime StartGets / Sets the start datetime for date rangesdt_startUnix timestampGet/Set OpenWeatherMap Datetime EndGets / Sets the end datetime for date rangesdt_endUnix timestampGet/Set OpenWeatherMap DatetimeGets / Sets a single point in timedtUnix TimestampOpenWeatherMap KeywordsPlease note that a majority of these keywords requires a paid OpenWeatherMap subscription. You can still try to run the keywords but most of them will fail with a http 4xx error unless you have a valid paid subscription.Each of the following keywords has a set of mandatory parameters. which means that if you used the setter methods to assign values forlatitudeandlongitude, for example, you can omit those values for the following keywords.KeywordDescriptionMandatoryparametersOptionalparametersCommentsGet Current WeatherAccess current weather data for any location onEarth including over 200,000 citieslatitudelongitudeapikeyoutput_formatunit_formatlanguageGet Hourly Forecast 4 DaysHourly forecast for 4 days (96 timestamps)latitudelongitudeapikeyoutput_formatnumberlanguagenooutput_formatsupport for HTMLGet OneCall ForecastCurrent and forecast weather datalatitudelongitudeapikeyexcludeunit_formatlanguageGet Daily Forecasts 16 DaysDaily Forecast 16 Days is available at any location on the globe.latitudelongitudeapikeynumberunit_formatoutput_formatlanguagenooutput_formatsupport for HTMLGet Climatic Forecasts 30 DaysClimate Forecast 30 Days allows you to request daily weather data for the next 30 dayslatitudelongitudeapikeynumberunit_formatoutput_formatlanguagenooutput_formatsupport for HTMLGet Current Solar RadiationCurrent solar radiation datalatitudelongitudeapikeyGet Solar Radiation ForecastForecast solar radiation datalatitudelongitudeapikeyGet Solar Radiation HistoryHistorical solar radiation datafor a from-to time spanlatitudelongitudeapikeydt_startdt_endGet 5 Day 3 Hour Forecast5 day forecast is available at any location on the globelatitudelongitudeapikeynumberunit_formatoutput_formatlanguagenooutput_formatsupport for HTMLGet Current Air Pollution RadiationCurrent air pollution datalatitudelongitudeapikeyGet Air Pollution ForecastAir pollution data forecastlatitudelongitudeapikeyGet Air Pollution HistoryHistorical Air Pollution datafor a from-to time spanlatitudelongitudeapikeydt_startdt_endGet Road Risk DataRoad Risk API provides weather dataand national alerts at the point ofdestination and along a routelatitudelongitudeapikeydtKnown issuesNot all OpenWeatherMap APIs have been assigned with corresponding Robot Framework keywords. What you see is what you get - at least for this version.TheGet Road Risk Datakeyword only supports a single set oflatitudeandlongitudevalues (the underlying API supports multiple sets)