Skip to main content

Meteoserver

PyPI PyPI - Downloads Documentation Status PyPI - License

A Python module to obtain and read Dutch weather data from Meteoserver.nl. The code is being developed by Marc van der Sluys of the department of Astrophysics at the Radboud University Nijmegen, the Netherlands and the department of Sustainable energy of the HAN University of Applied Sciences in Arnhem, the Netherlands. The Meteoserver package can be used under the conditions of the GPLv3 licence.

Installation

This package can be installed using pip install meteoserver. This should automatically install the dependency packages pandas and requests, if they haven't been installed already. If you are installing by hand, ensure that these packages are installed as well.

You will need to obtain a (free) account and API key at Meteoserver.nl to download data from the Meteoserver API.

Example use

"""Example Python script using the Meteoserver module."""

import meteoserver as meteo

myKey = 'a123456789'    # My Meteoserver API key - put your OWN key here!
myLocation = 'De Bilt'  # My location

# Weather forecast #################################################################################

# Print some help:
meteo.print_help_weatherforecast()

location = 'Unknown'  # Ensure we always have a location 'name' to write to file.

# Read weather-forecast data from file:
# data = meteo.read_json_file_weatherforecast('WeatherForecast1.json', full=True)  # Option 1: HARMONIE/HiRLAM (48 (42?) hours)
# data = meteo.read_json_file_weatherforecast('WeatherForecast2.json')  # Option 2: GFS (4/10 days), useful columns only, no location
# Option 2, with ALL columns and location; don't convert to numerical format, to allow writing to file later:
# data, location = meteo.read_json_file_weatherforecast('WeatherForecast2.json', full=True, loc=True, numeric=False)

# Get weather-forecast data from server:
# data = meteo.read_json_url_weatherforecast(myKey, myLocation, model='HARMONIE')  # Option 1: HARMONIE/HiRLAM
# data = meteo.read_json_url_weatherforecast(myKey, myLocation)  # Option 2 (default): GFS, useful columns only, no location
# Option 2, with ALL columns and location; don't convert to numerical format, to allow writing to file later:
data, location = meteo.read_json_url_weatherforecast(myKey, myLocation, full=True, loc=True, numeric=False)

# Print the data:
print(data)

# Write the downloaded data to a json file:
meteo.write_json_file_weatherforecast('WeatherForecast3.json', location, data)



# Sun forecast #####################################################################################

# Print some help:
meteo.print_help_sunData()

# Read a Meteoserver Sun-data JSON file from disc:
# current, forecast = meteo.read_json_file_sunData('SunData.json')
# Return the location; don't convert to numerical format, to allow writing to file later:
# current, forecast, location = meteo.read_json_file_sunData('SunData.json', loc=True, numeric=False)

# Get Meteoserver Sun data from the server for the given location (and key):
# current, forecast = meteo.read_json_url_sunData(myKey, myLocation)
# Return the location; don't convert to numerical format, to allow writing to file later:
current, forecast, location = meteo.read_json_url_sunData(myKey, myLocation, loc=True, numeric=False)

# Print the current-weather and forecast dataframes:
print("\nCurrent Sun/weather observation from a nearby station:")
print(current)

print("\nSun/weather forecast for the selected location/region:")
print(forecast)

# Write the downloaded data to a json file:
meteo.write_json_file_sunData('SunData1.json', location, current, forecast)

Meteoserver pages

  • Pypi: Meteoserver Python package
  • GitHub: Meteoserver source code
  • ReadTheDocs: Meteoserver documentation

Author and licence

References

  • Data, API key and API documentation can be obtained from Meteoserver.nl

Metadata

Release files for meteoserver 0.0.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meteoserver 0.0.19
File Size Uploaded Provenance Actions
meteoserver-0.0.19.tar.gz 23.0 kB Without provenance Details for meteoserver-0.0.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for meteoserver 0.0.19
File Interpreter ABI Platform Actions
meteoserver-0.0.19-py3-none-any.whl Python 3 none any Details for meteoserver-0.0.19-py3-none-any.whl

Total release size: 48.3 kB

Release files / meteoserver-0.0.19.tar.gz

Download URL meteoserver-0.0.19.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b39e0ab57fb076983282a27371a3993100ec489e77ac42cf8aa1c2bd10fa4024
BLAKE2b-256 checksum
How to use checksums
0c857754049a6755e4494dcff267a8c8c6b08aa60a0197043dd18ba223fa2a94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / meteoserver-0.0.19-py3-none-any.whl

Download URL meteoserver-0.0.19-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32ae6d2d01be2739e4c36dd0ff621aae593e7bea1d8a9ded61af2ec7efae250c
BLAKE2b-256 checksum
How to use checksums
de452106739f5eccc20dc1069ef73b49e85b6d0467fa360f6f1ea1f629e8b826
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Security for meteoserver 0.0.19

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page