aemetxfb — AEMet Data Access Library
aemetxfb is a Python library to access weather and climate data from AEMet (Agencia Estatal de Meteorología de España) without requiring an API key.
It provides a clean, type-annotated interface over AEMet’s public HTTP endpoints,
returning pandas.DataFrame objects, file paths, or structured dictionaries
depending on the data source.
Quick start
pip install aemetxfb
from aemetxfb.clim import get_normals
df = get_normals("3129") # Madrid Aeropuerto
print(df.loc["Year", "T"]) # Annual mean temperature (\u00b0C)
Features
No API key required — all data comes from public AEMet endpoints.
Pandas integration — returns
pandas.DataFramefor tabular data.Type-annotated — full type hints with
pyrightstrict checking.Minimal dependencies — only
pandasandnumpyat runtime; stdlib otherwise.Configurable timeouts — central
AEMetConfigfor HTTP request timeouts.Optional disk cache — SQLite-backed cache with TTL for climate data that changes rarely.
Hourly forecasts — 3-day forecast for ~8,000 Spanish municipalities with name and coordinate lookup.
User Guide
Developer Guide
API Reference
- aemetxfb package
- aemetxfb.clim
- aemetxfb.obs
get_chem_previous_day()get_chem_previous_month()get_chem_today()get_daily_summary()get_last_24h()get_lightning_latest()get_previous_daily_summaries()get_radar_PI_IB_refl_24h()get_radar_PI_IB_refl_4h()get_radar_regional_accumprec1_24h()get_radar_regional_accumprec6_36h()get_radar_regional_echotop_4h()get_radar_regional_latest()get_radar_regional_reflectivity_4h()get_UVI_previous_day()get_UVI_previous_day_img()get_UVI_running_year_img()get_ozone_previous_day()get_ozone_running_year()get_ozone_sounding()get_radiation_ir()get_radiation_rad()get_satellite_IR_24h()get_satellite_VIS_24h()get_satellite_global_24h()get_satellite_globe_0_24h()get_satellite_globe_415_24h()get_satellite_airmasses_24h()get_satellite_NDVI()get_satellite_SST()- Submodules
- aemetxfb.obs.chem
- aemetxfb.obs.lightning
- aemetxfb.obs.masts
- aemetxfb.obs.radar
- aemetxfb.obs.radiation
- aemetxfb.obs.satellite
- aemetxfb.pred
- aemetxfb.utils
- aemetxfb.cache
Indices