Integration of Weather City Forecasts Manager in Wagtail Projects.
Project description
Developer Guide: Adding City Forecasts to ClimWeb
This guide explains three ways to add city forecast data to ClimWeb:
1. Using the API
Endpoint
- POST
/api/forecasts/post
Authentication
- Requires Token.
- Obtain a token via POST to
/api/token/(TokenAuthentication) with payload
{
"username":"your_username",
"password":"your_password"
}
- Add header:
Authorization: Token <token>
Payload Example
{
"forecast_date": "2026-03-11",
"effective_time": "06:00:00",
"source": "local",
"replace_existing": true,
"city_forecasts": [
{
"city": "nairobi",
"condition": "Partly Cloudy",
"data_values": {
"max_temp": 28.5,
"min_temp": 18.2,
"humidity": 64
}
}
]
}
Example Python Script
import requests
API_URL = "http://<domain_name>/api/forecasts/post"
TOKEN = "your_token_here"
payload = { ... }
headers = {"Authorization": f"Token {TOKEN}", "Content-Type": "application/json"}
response = requests.post(API_URL, json=payload, headers=headers)
print(response.status_code)
print(response.json())
2. Automated City Forecast from Meteorological Providers (Meteorological Norway)
- This is simply implemented by enabling the automated forecasts checkbox under Forecast Settings > Forecast Source. This forecasts is updated automatically every three hours and has a 1 hour time interval (24 readings in a day)
To read more about Meteorological Norway location forecast visit:
- YR Location data forecast model
- Weather forecasts on Yr - how they are made
3. Manual CSV Upload
- Use the admin interface or dedicated upload page to upload city forecast data via CSV. Visit guide here.
- Download the CSV template .
- Fill in city forecast data in the template.
- Upload the CSV file using the web interface (typically via a form).
- The system will parse, validate, and import the data.
- Optionally, set 'overwrite existing' if you want to replace previous forecasts.
Notes
- All methods require valid city and parameter references.
- For API and automated methods, ensure authentication is set up.
- For manual upload, follow the template format and check for errors after upload.
For further details, see the API documentation .
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 forecastmanager-0.5.9.tar.gz.
File metadata
- Download URL: forecastmanager-0.5.9.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a821eb9a0c4bab1e816ccadf18145c697cd21a2dff1735de3859e3e68dca8316
|
|
| MD5 |
f38fee95a6085d6721ebdc82f18d1b2b
|
|
| BLAKE2b-256 |
31e17ce8ed8f6e49696656b2aa1d7b27f93ff3f7b8c63ec99c6aa228869be7ac
|
Provenance
The following attestation bundles were made for forecastmanager-0.5.9.tar.gz:
Publisher:
publish.yml on wmo-raf/forecastmanager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forecastmanager-0.5.9.tar.gz -
Subject digest:
a821eb9a0c4bab1e816ccadf18145c697cd21a2dff1735de3859e3e68dca8316 - Sigstore transparency entry: 1206124120
- Sigstore integration time:
-
Permalink:
wmo-raf/forecastmanager@689e1255cfa082fe1b8be5b49bede080023b84ed -
Branch / Tag:
refs/tags/0.5.9 - Owner: https://github.com/wmo-raf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@689e1255cfa082fe1b8be5b49bede080023b84ed -
Trigger Event:
release
-
Statement type:
File details
Details for the file forecastmanager-0.5.9-py3-none-any.whl.
File metadata
- Download URL: forecastmanager-0.5.9-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dc0c7af01416175697b7cf0796609e142155aedc6ec94060445efa9a88c3f9b
|
|
| MD5 |
c4716b4708da84afc46bf8c00e7ce964
|
|
| BLAKE2b-256 |
84bc4c0a9a30de0d3854546880ee490c0b8e955c971bd3d26e288e336d9abe1d
|
Provenance
The following attestation bundles were made for forecastmanager-0.5.9-py3-none-any.whl:
Publisher:
publish.yml on wmo-raf/forecastmanager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forecastmanager-0.5.9-py3-none-any.whl -
Subject digest:
1dc0c7af01416175697b7cf0796609e142155aedc6ec94060445efa9a88c3f9b - Sigstore transparency entry: 1206124124
- Sigstore integration time:
-
Permalink:
wmo-raf/forecastmanager@689e1255cfa082fe1b8be5b49bede080023b84ed -
Branch / Tag:
refs/tags/0.5.9 - Owner: https://github.com/wmo-raf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@689e1255cfa082fe1b8be5b49bede080023b84ed -
Trigger Event:
release
-
Statement type: