
Research
Security News
Malicious npm Packages Target BSC and Ethereum to Drain Crypto Wallets
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.
Python wrapper to fetch and parse daily and hourly weather observations from KNMI, either as raw text, CSV-like strings, or Pandas DataFrames.
See the official KNMI documentation for more details on data retrieval via scripts: KNMI Kennis- en datacentrum - Data ophalen vanuit een script
Note: This library is not affiliated in any way with KNMI; it only utilizes the KNMI API to request data.
KNMI-py is available via pip:
python -m pip install knmi-py
The library provides functions to retrieve both daily and hourly weather data:
knmi.get_day_data_raw(stations, start, end, inseason, variables)
knmi.get_day_data_dataframe(stations, start, end, inseason, variables)
knmi.get_hour_data_raw(stations, start, end, inseason, variables)
knmi.get_hour_data_dataframe(stations, start, end, inseason, variables)
knmi.get_forecast_dataframe(station, conform_values, variables)
(Limited to De Bilt, station 260)Need to find a station number or understand what the weather variable abbreviations mean?
knmi.stations
: A dictionary of all available KNMI weather stations.knmi.variables
: A dictionary providing explanations for weather variable codes.import knmi
import pandas as pd
# Get daily data for De Bilt (station 260) for a specific period
daily_df = knmi.get_day_data_dataframe(
stations=,
start='2023-01-01',
end='2023-01-31'
)
print("Daily Data:")
print(daily_df.head())
# Get hourly data for Schiphol (station 240) for a specific day
# Note: start and end for hourly data are strings like "YYYYMMDDHH"
hourly_df = knmi.get_hour_data_dataframe(
stations=,
start="2023032801", # March 28, 2023, 01:00
end="2023032824" # March 28, 2023, 24:00
)
print("\nHourly Data:")
print(hourly_df.head())
The KNMI-py Python library is not affiliated with, created by, or maintained by KNMI. It merely uses the publicly available KNMI API to request data.
Contributions are welcome! Please feel free to open an issue or submit a pull request.
This project uses modern Python development tools:
pyproject.toml
(with hatchling
as the build backend).uv
is used for fast dependency management.Ruff
(configured via pyproject.toml
or ruff.toml
).pytest
for running tests.tox
(with tox-uv
) is used to ensure compatibility across multiple Python versions (currently Python 3.9+). Run tox
to execute tests in all configured environments.Please ensure pre-commit hooks pass and tests succeed before submitting a pull request.
FAQs
A Python API wrapper for KNMI data.
We found that knmi-py demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.
Security News
TC39 advances 9 JavaScript proposals, including Array.fromAsync, Error.isError, and Explicit Resource Management, which are now headed into the ECMAScript spec.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.