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 (Free plan)

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 requests (point forecasts and map tiles counted together).

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: on the Free plan, show it with the data ("Rain forecast: Nimbo Weather" and its link). Optional on paid plans.

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.2

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.2
File Size Uploaded Provenance Actions
nimbo_weather-0.1.2.tar.gz 13.8 kB Without provenance Details for nimbo_weather-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 26.4 kB

Release files / nimbo_weather-0.1.2.tar.gz

Download URL nimbo_weather-0.1.2.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3c1495b9f425b67a299718c281922756041360c4be88a34fb300b9a173bf1072
BLAKE2b-256 checksum
How to use checksums
98c3c45b5ee2eaa68dd2544c4256d75d53832012a84d4b1d9049987b81da47a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

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

Download URL nimbo_weather-0.1.2-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
629fae5ae9164049233be92d538acfa261c3fb17453e907ce2fea779f6875efd
BLAKE2b-256 checksum
How to use checksums
2d81c3c081ba4e6f06d81a9394f38de91419909b3efab1d87ca1f75a7eba33d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for nimbo-weather 0.1.2

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