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 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: 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.1

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.1
File Size Uploaded Provenance Actions
nimbo_weather-0.1.1.tar.gz 13.5 kB Without provenance Details for nimbo_weather-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 25.9 kB

Release files / nimbo_weather-0.1.1.tar.gz

Download URL nimbo_weather-0.1.1.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0da51df4b07fce3c44d14b6e8accf4f6243863bd6e039ada79f38425397b0393
BLAKE2b-256 checksum
How to use checksums
4f0e56e56e0ab6028b7b9af3c33bf2b36eac03b190ef3781c19203160689f3c6
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.1-py3-none-any.whl

Download URL nimbo_weather-0.1.1-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59e83046e8659751c861c51ac90102dc83178074b169373e15ea92d8fd2a4459
BLAKE2b-256 checksum
How to use checksums
8aeef2efa6a59f8259175f3792b9674830bb5bb02ecdfdf640409f1e2fdbd9cf
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.1

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