Skip to main content

nimbo-weather

Python client for the Nimbo Weather rain nowcast API: minute-by-minute rain for the next 3 hours anywhere in the European radar coverage, at 2 km.

  • Sync and asyncio clients, typed (py.typed), one dependency (httpx)
  • Typed exceptions for every API error code
  • Retries on rate limits and server errors, honouring Retry-After
  • Map tile URL helpers

Install

pip install nimbo-weather

Quickstart

Get a free key (no card) at nimboweather.com, then:

from nimbo_weather import Nimbo

nimbo = Nimbo("nimbo_...")  # or set NIMBO_API_KEY and call Nimbo()
forecast = nimbo.nowcast(52.37, 4.90)  # Amsterdam

if forecast.summary:
    print(forecast.summary.text)  # "Light rain starting in 25 min, for about 40 min"
for step in forecast.minutely[:6]:
    print(step.time, step.precip_mm_h, step.precip_probability)
print(forecast.attribution)  # show this with the data

Async:

from nimbo_weather import AsyncNimbo

async with AsyncNimbo() as nimbo:
    forecast = await nimbo.nowcast(48.86, 2.35, horizon=60, step=1)

Methods

Method Endpoint Key
nowcast(lat, lon, horizon=None, step=None) /v1/nowcast yes
tiles_index() /v1/tiles/index yes
key_usage() /v1/keys/me (not counted) yes
status() /v1/status no
palettes() /v1/palettes no
tile_url(z, x, y, offset_min=5, layer="rain", palette=None) builds a tile URL in the URL

horizon is 5 to 180 minutes (default 180), step is 1, 5, 10 or 15 minutes (default 5). Answers are dataclasses; the full JSON is in .raw. Nowcast.rate_limit carries your monthly allowance.

Things to check in every answer

  • coverage == "no_radar": the point is in the forecast area but no radar sees it. summary and every value are None.
  • stale: the forecast is late (more than 25 min old). notice explains an outage.
  • attribution: show it with the data, as the data licence requires. On the Free plan also show "Rain forecast: Nimbo Weather" with a link to nimboweather.com.

Errors

All errors derive from NimboError (.status, .code, .message, .body, .retry_after).

Exception When
AuthenticationError 401: missing, invalid or revoked key
OutOfCoverageError 404 out_of_coverage: outside the forecast area, do not retry
NotFoundError 404: unknown layer, palette, tile or time
InvalidParameterError 422: see .parameters
QuotaExceededError 429 monthly_quota_exceeded: wait for the reset or upgrade
RateLimitError 429: too many requests at once
ServiceUnavailableError 503: no recent forecast, retry in about 10 minutes
ServerError other 5xx
NimboConnectionError network error or timeout

Rate limits (429) and server errors are retried max_retries times (default 2) with exponential backoff, waiting Retry-After when the API sends it and it is at most max_retry_wait seconds (default 30). The monthly quota and 503 forecast_unavailable are not retried.

Map tiles

Tiles take the key in the query string only, so a tile URL contains your key. Build them on your server or in an app you control; do not put your key in a public web page.

index = nimbo.tiles_index()
for frame in index.forecast:
    print(frame.offset_min, frame.url(6, 33, 21, api_key=nimbo.api_key))

MIT licence.

Metadata

Release files for nimbo-weather 0.1.0

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

Source distribution (sdist)

Source distribution for nimbo-weather 0.1.0
File Size Uploaded Provenance Actions
nimbo_weather-0.1.0.tar.gz 13.5 kB Without provenance Details for nimbo_weather-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nimbo-weather 0.1.0
File Interpreter ABI Platform Actions
nimbo_weather-0.1.0-py3-none-any.whl Python 3 none any Details for nimbo_weather-0.1.0-py3-none-any.whl

Total release size: 25.9 kB

Release files / nimbo_weather-0.1.0.tar.gz

Download URL nimbo_weather-0.1.0.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
af76c023d420c6bcaf4db39331403bf11ee9e4b9d18003be28e430b76c19a5cf
BLAKE2b-256 checksum
How to use checksums
e5b7c23c3c94fa70ebc0cd5a3fea6e3f1904ab269aa4c2b2d8e20dab762e2ce3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Release files / nimbo_weather-0.1.0-py3-none-any.whl

Download URL nimbo_weather-0.1.0-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
824975f549000ebc63fd7cc36e1533a49e0b612c7e9a08ba8b21aa5968c89adf
BLAKE2b-256 checksum
How to use checksums
2b1a277e14181d86cfdc5b9b80d24db8150fbef8929e6747d36c9bd1a5a58078
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Security for nimbo-weather 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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