Open-Meteo Python SDK
https://pypi.org/project/openmeteo-sdk/
pip install openmeteo-sdk
Missing sunrise, sunset, moonrise, and moonset timestamps
VariableWithValues.ValuesInt64AsNumpy() returns raw Unix timestamps in seconds for sunrise, sunset, moonrise, and moonset. When an event does not occur during the local calendar day, the value is the missing timestamp sentinel INT64_MAX (9223372036854775807).
For pandas, convert the raw accessor result to NaT like this:
import numpy as np
import pandas as pd
missing_int64 = np.iinfo(np.int64).max
raw = variable.ValuesInt64AsNumpy()
timestamps = pd.to_datetime(
pd.Series(raw).mask(raw == missing_int64),
unit="s",
utc=True,
)
Metadata
Release files for openmeteo-sdk 1.28.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openmeteo_sdk-1.28.1.tar.gz | 13.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openmeteo_sdk-1.28.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.6 kB
Release files / openmeteo_sdk-1.28.1.tar.gz
| Download URL | openmeteo_sdk-1.28.1.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2bbeb9438846e72097999041327aacbe666b5406bb77c7f40c4a11924b446e8a
|
|
BLAKE2b-256 checksum How to use checksums |
8a6d7ac15c95e42abae815d57a46adc8a42df2db8b97995d15dfe0115bf9d16f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / openmeteo_sdk-1.28.1-py3-none-any.whl
| Download URL | openmeteo_sdk-1.28.1-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e43277956f28ad5b6eff37dd235fba760b509100bc0a65164f55eec88ee9fa50
|
|
BLAKE2b-256 checksum How to use checksums |
ba23d83009ccefa93db1a03e53fc5ca93cff8edcdf586d26257a708effcc8a3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|