Download the PHP package dle79/open-meteo without Composer

On this page you can find all versions of the php package dle79/open-meteo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package open-meteo

Orionphp Open-Meteo Client

Latest Stable Version PHP Version Require

A typed PHP 8.4 client for the Open-Meteo weather API — free, no API key required.

Supports:


Requirements


Installation

You also need a PSR-18 client and a PSR-17 factory. If you don't have one yet:


Quick Start


Building a Forecast Request

All requests are created through ForecastRequestBuilder. Coordinates are validated on creation — invalid values throw InvalidCoordinatesException.

Every field setter accepts PHP variadic enums. Duplicate entries are deduplicated automatically.


Weather Models

Constant Value Region
BEST_MATCH best_match Auto-select (recommended)
ECMWF_IFS ecmwf_ifs Global
GFS gfs Global
ICON_GLOBAL icon_global Global
GEM_GLOBAL gem_global Global
JMA_GSM jma_gsm Global
UKMO_GLOBAL ukmo_global Global
ICON_EU icon_eu Europe
ICON_D2 icon_d2 Germany / Central Europe
METEOFRANCE_ARPEGE meteofrance_arpege Europe
METEOFRANCE_AROME meteofrance_arome France
DMI_HARMONIE_AROME_EUROPE dmi_harmonie_arome_europe Europe
KNMI_HARMONIE_AROME_NETHERLANDS knmi_harmonie_arome_netherlands Netherlands
HRRR hrrr United States
NAM_CONUS nam_conus United States

Model helpers

Combining multiple models

When you request more than one model, each field in the response carries per-model value arrays:


Forecast Intervals

Current conditions

15-minute intervals

Available fields: TEMPERATURE_2M, APPARENT_TEMPERATURE, RELATIVE_HUMIDITY_2M, DEW_POINT_2M, PRECIPITATION, RAIN, SNOWFALL, SHOWERS, WEATHER_CODE, CLOUD_COVER, WIND_SPEED_10M, WIND_DIRECTION_10M, WIND_GUSTS_10M, VISIBILITY, SHORTWAVE_RADIATION, DIRECT_RADIATION, DIFFUSE_RADIATION, DIRECT_NORMAL_IRRADIANCE

Hourly

Available fields include: TEMPERATURE_2M, APPARENT_TEMPERATURE, WEATHER_CODE, RELATIVE_HUMIDITY_2M, DEW_POINT_2M, PRECIPITATION, PRECIPITATION_PROBABILITY, RAIN, SHOWERS, SNOWFALL, SNOW_DEPTH, CLOUD_COVER, WIND_SPEED_10M, WIND_DIRECTION_10M, WIND_GUSTS_10M, PRESSURE_MSL, SURFACE_PRESSURE, VISIBILITY, UV_INDEX, SHORTWAVE_RADIATION, DIRECT_RADIATION, DIFFUSE_RADIATION, DIRECT_NORMAL_IRRADIANCE, EVAPOTRANSPIRATION, ET0_FAO_EVAPOTRANSPIRATION, VAPOUR_PRESSURE_DEFICIT, CAPE, and soil temperature fields at 0 cm, 6 cm, 18 cm, 54 cm.

Daily

Available fields: WEATHER_CODE, TEMPERATURE_2M_MAX, TEMPERATURE_2M_MIN, APPARENT_TEMPERATURE_MAX, APPARENT_TEMPERATURE_MIN, PRECIPITATION_SUM, PRECIPITATION_PROBABILITY_MAX, RAIN_SUM, SHOWERS_SUM, SNOWFALL_SUM, SNOW_DEPTH_MAX, WIND_SPEED_10M_MAX, WIND_GUSTS_10M_MAX, WIND_DIRECTION_10M_DOMINANT, SUNRISE, SUNSET, SUNSHINE_DURATION, UV_INDEX_MAX, SHORTWAVE_RADIATION_SUM, ET0_FAO_EVAPOTRANSPIRATION


Weather Code Translations

WMO weather codes returned by the API can be translated to human-readable strings in multiple languages.

Supported locales: de, en, es, fr

Translation files are plain PHP arrays. You can supply your own locale directory:

A locale file must return an array<int, string> keyed by WMO weather code integer.


Logging

OpenMeteoClient accepts any PSR-3 logger as an optional third constructor argument. When omitted, a NullLogger is used.

Logged events:

Level Event
info Outgoing request URL
error HTTP client exception
error Non-2xx response status
error Invalid or unexpected JSON

Error Handling

All exceptions extend OpenMeteoException. Catch specifically or broadly as needed:


Development

CI runs automatically on every push and pull request via GitHub Actions.


License

MIT — see LICENSE for details.


All versions of open-meteo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
psr/log Version ^3.0
psr/http-client Version ^1.0
psr/http-message Version ^2.0
psr/http-factory Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dle79/open-meteo contains the following files

Loading the files please wait ...