ocaml-weather is an OCaml library to access weather data from OpenWeather's API.
So far it only supports the Current weather data feature, that is available for free accounts. To use it, you must first request a free API key. We are not affiliated with OpenWeather, but having an API key and accepting their User Terms of Service is required to access the API.
ocaml-weather provides implementations for several asynchronous programming libraries:
Weather_lwt
uses the Lwt library.Weather_lwt_unix
uses the Unix bindings of the Lwt library.Weather_async
uses the Async library.Weather_mirage
(experimental) uses a Mirage interface so that it can be part of unikernels, this backend is still in progress.
A synchronous library Weather
is also exposed that relies on curl
to access the OpenWeather API.
Examples are provided for each backend: