An integration for the AEMET service with Plone
Project description
collective.volto.aemet
An integration for the AEMET service with Plone.
Features
- Control panel in Plone registry to manage
AEMET settings. - RestApi endpoint that exposes these settings for Volto.
- RestApi endpoint that exposes the current weather forecast for location defined on the AEMET Settings control panel.
Screenshot
Add-on Configuration Access
AEMET Settings control panel
Volto integration
To use this product in Volto, your Volto project needs to include a new add-on: https://github.com/collective/volto-aemet
Translations
This product has been translated into
- English
- Spanish
Compatibility
- Tested with Python 3.12 and Plone 6.1.5.
Install it
Install collective.volto.aemet with pip:
pip install collective.volto.aemet
And to create the Plone site:
make create-site
@aemet-settings route
Anonymous users can't access registry resources by default with plone.restapi (there is a special permission).
To avoid enabling registry access to everyone, this package exposes a dedicated RestApi route with AEMET settings: @aemet-settings:
Get the information from the AEMET settings via curl command:
curl -X GET http://localhost:8080/Plone/@controlpanels/aemet-settings \
-H "Accept: application/json" \
--user admin:admin
This route returns a JSON object containing the AEMET weather forecast settings and data via curl command:
{
"@id": "http://localhost:8080/Plone/@controlpanels/aemet-settings",
"data": {
"location_id": "41091"
},
"group": "Add-on Configuration",
"schema": {
"fieldsets": [
{
"behavior": "plone",
"fields": [
"location_id"
],
"id": "default",
"title": "Default"
}
],
"properties": {
"location_id": {
"description": "The Location ID of the AEMET service, for example '41091' to Sevilla location ID.",
"factory": "Text line (String)",
"title": "Location ID",
"type": "string"
}
},
"required": [
"location_id"
],
"type": "object"
},
"title": "AEMET Settings"
}
Update the location_id field value of the AEMET settings:
curl -i -X PATCH http://localhost:8080/Plone/@controlpanels/aemet-settings \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data '{"location_id": "28058"}' \
--user admin:admin
This route returns a HTTP response:
HTTP/1.1 204 No Content
Connection: close
Date: Fri, 17 Jul 2026 12:52:40 GMT
Server: waitress
Via: waitress
X-Powered-By: Zope (www.zope.dev), Python (www.python.org)
@aemet-weather-forecast route
This route is used to fetch the current weather forecast for location defined on the AEMET Settings control panel:
curl -X GET http://localhost:8080/Plone/++api++/@aemet-weather-forecast
This route returns a JSON object containing the AEMET weather forecast data:
{
"forecast": [
{
"currentHour": 14,
"date": "2026-07-17",
"name": "Madrid",
"province": "Madrid",
"skyState": "Despejado",
"skyStateValue": "11",
"tempMax": "34",
"tempMin": "20",
"timePeriod": "12-18"
}
]
}
This can be used in for a Volto integration for example the WeatherForecast component available into the volto-aemet add-on.
Contribute
Prerequisites ✅
- An operating system that runs all the requirements mentioned.
- uv
- Make
- Git
- Docker (optional)
Installation 🔧
-
Clone this repository, then change your working directory.
git clone git@github.com:collective/collective.volto.aemet.git cd collective.volto.aemet
-
Install this code base.
make install
Add features using plonecli or bobtemplates.plone
This package provides markers as strings (<!-- extra stuff goes here -->) that are compatible with plonecli and bobtemplates.plone.
These markers act as hooks to add all kinds of subtemplates, including behaviors, control panels, upgrade steps, or other subtemplates from plonecli.
To run plonecli with configuration to target this package, run the following command.
make add <template_name>
For example, you can add a content type to your package with the following command.
make add content_type
You can add a behavior with the following command.
make add behavior
See also:
You can check the list of available subtemplates in the bobtemplates.plone README.md file.
See also the documentation of Mockup and Patternslib for how to build the UI toolkit for Classic UI.
Credits
Developed with the support of:
-
Agencia Estatal de Meteorología - AEMET. Gobierno de España.
-
Instituto Municipal de Deportes - IMD, Seville City Council, Spain.
Acknowledgements 🙏
Generated using Cookieplone (0.9.10) and cookieplone-templates (eb40854) on 2025-11-06 19:48:38.313942. A special thanks to all contributors and supporters!
Authors
This product was developed by Leonardo J. Caballero G..
Contributors
You can see a list of contributors in the CONTRIBUTORS.md file.
License
The project is licensed under GPLv2.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file collective_volto_aemet-1.0.0a1.tar.gz.
File metadata
- Download URL: collective_volto_aemet-1.0.0a1.tar.gz
- Upload date:
- Size: 266.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a8e56b0d0d63ed148a0f843a8b6063a3cf53997a9be6008062ce51b15760ccb
|
|
| MD5 |
69b39ce705278aa8ba8bc09812a20ef1
|
|
| BLAKE2b-256 |
52d194c978ca1a90204a8f7e1d2ac759448660b488f20da10dcc3768449bc117
|
File details
Details for the file collective_volto_aemet-1.0.0a1-py3-none-any.whl.
File metadata
- Download URL: collective_volto_aemet-1.0.0a1-py3-none-any.whl
- Upload date:
- Size: 51.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
185df9f870d64cf2bd69928366fd4e508d7489404b44a3e98311a7578c59cdc8
|
|
| MD5 |
a1f9f2015080719ef9a08548282eda04
|
|
| BLAKE2b-256 |
a12532e5454c1b06f6ea6c4e3b9afdb4436ee71127c67831330d53471201b649
|