python-google-weather-api 0.0.4__tar.gz → 0.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_google_weather_api-0.0.4/src/python_google_weather_api.egg-info → python_google_weather_api-0.0.6}/PKG-INFO +4 -8
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/README.md +1 -5
- python_google_weather_api-0.0.6/pyproject.toml +88 -0
- python_google_weather_api-0.0.6/setup.cfg +4 -0
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/google_weather_api/__init__.py +7 -8
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/google_weather_api/api.py +18 -11
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/google_weather_api/exceptions.py +4 -0
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/google_weather_api/model.py +13 -39
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6/src/python_google_weather_api.egg-info}/PKG-INFO +4 -8
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/python_google_weather_api.egg-info/SOURCES.txt +0 -1
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/python_google_weather_api.egg-info/requires.txt +2 -2
- python_google_weather_api-0.0.4/pyproject.toml +0 -83
- python_google_weather_api-0.0.4/setup.cfg +0 -16
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/LICENSE +0 -0
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/google_weather_api/py.typed +0 -0
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/python_google_weather_api.egg-info/dependency_links.txt +0 -0
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/python_google_weather_api.egg-info/top_level.txt +0 -0
- {python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/tests/test_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-google-weather-api
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: A python client library for Google Weather API
|
|
5
5
|
Author-email: tronikos <tronikos@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -11,8 +11,8 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: aiohttp>=3.8
|
|
13
13
|
Requires-Dist: mashumaro
|
|
14
|
-
Provides-Extra:
|
|
15
|
-
Requires-Dist: pytest
|
|
14
|
+
Provides-Extra: test
|
|
15
|
+
Requires-Dist: pytest; extra == "test"
|
|
16
16
|
Dynamic: license-file
|
|
17
17
|
|
|
18
18
|
# python-google-weather-api
|
|
@@ -42,12 +42,8 @@ python -m pip install pre-commit
|
|
|
42
42
|
pre-commit install
|
|
43
43
|
pre-commit run --all-files
|
|
44
44
|
|
|
45
|
-
# Alternative: run formatter, lint, and type checking
|
|
46
|
-
python -m pip install isort black flake8 ruff mypy
|
|
47
|
-
isort . ; black . ; flake8 . ; ruff check . --fix ; mypy --install-types .
|
|
48
|
-
|
|
49
45
|
# Run tests
|
|
50
|
-
python -m pip install
|
|
46
|
+
python -m pip install -e ".[test]"
|
|
51
47
|
pytest
|
|
52
48
|
|
|
53
49
|
# Build package
|
|
@@ -25,12 +25,8 @@ python -m pip install pre-commit
|
|
|
25
25
|
pre-commit install
|
|
26
26
|
pre-commit run --all-files
|
|
27
27
|
|
|
28
|
-
# Alternative: run formatter, lint, and type checking
|
|
29
|
-
python -m pip install isort black flake8 ruff mypy
|
|
30
|
-
isort . ; black . ; flake8 . ; ruff check . --fix ; mypy --install-types .
|
|
31
|
-
|
|
32
28
|
# Run tests
|
|
33
|
-
python -m pip install
|
|
29
|
+
python -m pip install -e ".[test]"
|
|
34
30
|
pytest
|
|
35
31
|
|
|
36
32
|
# Build package
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "python-google-weather-api"
|
|
3
|
+
version = "0.0.6"
|
|
4
|
+
license = "Apache-2.0"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name="tronikos", email="tronikos@gmail.com" },
|
|
7
|
+
]
|
|
8
|
+
description = "A python client library for Google Weather API"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"aiohttp>=3.8",
|
|
13
|
+
"mashumaro",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[project.optional-dependencies]
|
|
17
|
+
test = [
|
|
18
|
+
"pytest",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
[project.urls]
|
|
23
|
+
"Homepage" = "https://github.com/tronikos/python-google-weather-api"
|
|
24
|
+
"Bug Tracker" = "https://github.com/tronikos/python-google-weather-api/issues"
|
|
25
|
+
|
|
26
|
+
[build-system]
|
|
27
|
+
requires = ["setuptools"]
|
|
28
|
+
build-backend = "setuptools.build_meta"
|
|
29
|
+
|
|
30
|
+
[tool.ruff]
|
|
31
|
+
target-version = "py311"
|
|
32
|
+
line-length = 127
|
|
33
|
+
exclude = [
|
|
34
|
+
".git", ".mypy_cache", ".ruff_cache", ".venv", "__pypackages__",
|
|
35
|
+
"build", "dist", "venv", "*_pb2.py", "*_pb2_grpc.py", "*.pyi"
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[tool.ruff.lint]
|
|
39
|
+
select = [
|
|
40
|
+
"A", # flake8-builtins
|
|
41
|
+
"ASYNC", # flake8-async
|
|
42
|
+
"B", # flake8-bugbear
|
|
43
|
+
"C", # flake8-mccabe
|
|
44
|
+
"C4", # flake8-comprehensions
|
|
45
|
+
"D", # pydocstyle
|
|
46
|
+
"E", # pycodestyle (error)
|
|
47
|
+
"F", # pyflakes
|
|
48
|
+
"G", # flake8-logging-format
|
|
49
|
+
"I", # isort
|
|
50
|
+
"PGH", # pygrep-hooks
|
|
51
|
+
"PL", # Pylint
|
|
52
|
+
"RET", # flake8-return
|
|
53
|
+
"RUF", # Ruff-specific rules
|
|
54
|
+
"S", # flake8-bandit (security)
|
|
55
|
+
"SIM", # flake8-simplify
|
|
56
|
+
"T20", # flake8-print
|
|
57
|
+
"TCH", # flake8-type-checking
|
|
58
|
+
"TRY", # tryceratops
|
|
59
|
+
"UP", # pyupgrade
|
|
60
|
+
"W", # pycodestyle (warning)
|
|
61
|
+
]
|
|
62
|
+
ignore = [
|
|
63
|
+
"S101", # Ignore assert
|
|
64
|
+
"D203", # 1 blank line required before class docstring
|
|
65
|
+
"D213", # Multi-line docstring summary should start at the second line
|
|
66
|
+
"PLR0913", # Too many arguments in function definition
|
|
67
|
+
"PLR1714", # Consider merging multiple comparisons
|
|
68
|
+
"PLR2004", # Magic value used in comparison
|
|
69
|
+
"TRY003", # Avoid specifying long messages outside the exception class
|
|
70
|
+
]
|
|
71
|
+
fixable = ["ALL"]
|
|
72
|
+
|
|
73
|
+
[tool.ruff.lint.mccabe]
|
|
74
|
+
max-complexity = 25
|
|
75
|
+
|
|
76
|
+
[tool.mypy]
|
|
77
|
+
python_version = "3.11"
|
|
78
|
+
exclude = [".venv", "venv", "build"]
|
|
79
|
+
pretty = true
|
|
80
|
+
strict = true
|
|
81
|
+
show_error_codes = true
|
|
82
|
+
warn_incomplete_stub = true
|
|
83
|
+
enable_error_code = ["ignore-without-code", "redundant-self", "truthy-iterable"]
|
|
84
|
+
|
|
85
|
+
[tool.codespell]
|
|
86
|
+
skip = "*.json,*.csv,*.lock,./.git/*,./.venv/*"
|
|
87
|
+
check-filenames = true
|
|
88
|
+
check-hidden = true
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from .api import GoogleWeatherApi
|
|
4
4
|
from .exceptions import (
|
|
5
|
+
GoogleWeatherApiAuthError,
|
|
5
6
|
GoogleWeatherApiConnectionError,
|
|
6
7
|
GoogleWeatherApiError,
|
|
7
8
|
GoogleWeatherApiResponseError,
|
|
@@ -35,22 +36,20 @@ from .model import (
|
|
|
35
36
|
)
|
|
36
37
|
|
|
37
38
|
__all__ = [
|
|
38
|
-
# API
|
|
39
|
-
"GoogleWeatherApi",
|
|
40
|
-
# Exceptions
|
|
41
|
-
"GoogleWeatherApiConnectionError",
|
|
42
|
-
"GoogleWeatherApiError",
|
|
43
|
-
"GoogleWeatherApiResponseError",
|
|
44
|
-
# Models
|
|
45
39
|
"AirPressure",
|
|
46
40
|
"CurrentConditionsHistory",
|
|
47
41
|
"CurrentConditionsResponse",
|
|
48
|
-
"Date",
|
|
49
42
|
"DailyForecastResponse",
|
|
43
|
+
"Date",
|
|
50
44
|
"DateTime",
|
|
51
45
|
"ForecastDay",
|
|
52
46
|
"ForecastDayPart",
|
|
53
47
|
"ForecastHour",
|
|
48
|
+
"GoogleWeatherApi",
|
|
49
|
+
"GoogleWeatherApiAuthError",
|
|
50
|
+
"GoogleWeatherApiConnectionError",
|
|
51
|
+
"GoogleWeatherApiError",
|
|
52
|
+
"GoogleWeatherApiResponseError",
|
|
54
53
|
"HourlyForecastResponse",
|
|
55
54
|
"IceThickness",
|
|
56
55
|
"Interval",
|
{python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/google_weather_api/api.py
RENAMED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from http import HTTPStatus
|
|
6
5
|
import logging
|
|
6
|
+
from http import HTTPStatus
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
9
|
import aiohttp
|
|
10
10
|
|
|
11
11
|
from .exceptions import (
|
|
12
|
+
GoogleWeatherApiAuthError,
|
|
12
13
|
GoogleWeatherApiConnectionError,
|
|
13
14
|
GoogleWeatherApiResponseError,
|
|
14
15
|
)
|
|
@@ -67,16 +68,26 @@ class GoogleWeatherApi:
|
|
|
67
68
|
res: dict[str, Any] = await resp.json()
|
|
68
69
|
_LOGGER.debug("Got %s for %s", resp.status, url)
|
|
69
70
|
if resp.status != HTTPStatus.OK:
|
|
70
|
-
|
|
71
|
+
error_data = res.get("error", {})
|
|
72
|
+
error_msg = error_data.get("message", "Unknown API error")
|
|
73
|
+
|
|
74
|
+
if resp.status in (HTTPStatus.UNAUTHORIZED, HTTPStatus.FORBIDDEN):
|
|
75
|
+
raise GoogleWeatherApiAuthError(error_msg)
|
|
76
|
+
|
|
77
|
+
# Google APIs often return 400 Bad Request for invalid API keys
|
|
78
|
+
if resp.status == HTTPStatus.BAD_REQUEST:
|
|
79
|
+
for detail in error_data.get("details", []):
|
|
80
|
+
if detail.get("reason") == "API_KEY_INVALID":
|
|
81
|
+
raise GoogleWeatherApiAuthError(error_msg)
|
|
82
|
+
|
|
83
|
+
raise GoogleWeatherApiResponseError(error_msg)
|
|
71
84
|
return res
|
|
72
85
|
except TimeoutError as err:
|
|
73
86
|
raise GoogleWeatherApiConnectionError("Timeout") from err
|
|
74
87
|
except aiohttp.ClientError as err:
|
|
75
88
|
raise GoogleWeatherApiConnectionError(err) from err
|
|
76
89
|
|
|
77
|
-
async def async_get_current_conditions(
|
|
78
|
-
self, latitude: float, longitude: float
|
|
79
|
-
) -> CurrentConditionsResponse:
|
|
90
|
+
async def async_get_current_conditions(self, latitude: float, longitude: float) -> CurrentConditionsResponse:
|
|
80
91
|
"""Fetch current weather conditions.
|
|
81
92
|
|
|
82
93
|
See https://developers.google.com/maps/documentation/weather/reference/rest/v1/currentConditions/lookup
|
|
@@ -90,9 +101,7 @@ class GoogleWeatherApi:
|
|
|
90
101
|
)
|
|
91
102
|
return CurrentConditionsResponse.from_dict(data)
|
|
92
103
|
|
|
93
|
-
async def async_get_hourly_forecast(
|
|
94
|
-
self, latitude: float, longitude: float, hours: int = 48
|
|
95
|
-
) -> HourlyForecastResponse:
|
|
104
|
+
async def async_get_hourly_forecast(self, latitude: float, longitude: float, hours: int = 48) -> HourlyForecastResponse:
|
|
96
105
|
"""Fetch hourly weather forecast.
|
|
97
106
|
|
|
98
107
|
See https://developers.google.com/maps/documentation/weather/reference/rest/v1/forecast.hours/lookup
|
|
@@ -108,9 +117,7 @@ class GoogleWeatherApi:
|
|
|
108
117
|
)
|
|
109
118
|
return HourlyForecastResponse.from_dict(data)
|
|
110
119
|
|
|
111
|
-
async def async_get_daily_forecast(
|
|
112
|
-
self, latitude: float, longitude: float, days: int = 10
|
|
113
|
-
) -> DailyForecastResponse:
|
|
120
|
+
async def async_get_daily_forecast(self, latitude: float, longitude: float, days: int = 10) -> DailyForecastResponse:
|
|
114
121
|
"""Fetch daily weather forecast.
|
|
115
122
|
|
|
116
123
|
See https://developers.google.com/maps/documentation/weather/reference/rest/v1/forecast.days/lookup
|
|
@@ -9,5 +9,9 @@ class GoogleWeatherApiConnectionError(GoogleWeatherApiError):
|
|
|
9
9
|
"""Exception connecting to the Google Weather API."""
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
class GoogleWeatherApiAuthError(GoogleWeatherApiError):
|
|
13
|
+
"""Exception raised for authentication errors in the Google Weather API."""
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
class GoogleWeatherApiResponseError(GoogleWeatherApiError):
|
|
13
17
|
"""Exception raised for errors in the Google Weather API response."""
|
{python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/google_weather_api/model.py
RENAMED
|
@@ -119,9 +119,7 @@ class Precipitation(DataClassJSONMixin):
|
|
|
119
119
|
qpf: QuantitativePrecipitationForecast
|
|
120
120
|
"""The amount of precipitation (rain or snow), measured as liquid water."""
|
|
121
121
|
|
|
122
|
-
snow_qpf: QuantitativePrecipitationForecast | None = field(
|
|
123
|
-
default=None, metadata={"alias": "snowQpf"}
|
|
124
|
-
)
|
|
122
|
+
snow_qpf: QuantitativePrecipitationForecast | None = field(default=None, metadata={"alias": "snowQpf"})
|
|
125
123
|
"""The amount of snow accumulation, measured as liquid water equivalent."""
|
|
126
124
|
|
|
127
125
|
|
|
@@ -317,9 +315,7 @@ class CurrentConditionsResponse(DataClassJSONMixin):
|
|
|
317
315
|
temperature: Temperature
|
|
318
316
|
"""The current temperature."""
|
|
319
317
|
|
|
320
|
-
feels_like_temperature: Temperature = field(
|
|
321
|
-
metadata={"alias": "feelsLikeTemperature"}
|
|
322
|
-
)
|
|
318
|
+
feels_like_temperature: Temperature = field(metadata={"alias": "feelsLikeTemperature"})
|
|
323
319
|
"""The measure of how the temperature currently feels like."""
|
|
324
320
|
|
|
325
321
|
dew_point: Temperature = field(metadata={"alias": "dewPoint"})
|
|
@@ -343,9 +339,7 @@ class CurrentConditionsResponse(DataClassJSONMixin):
|
|
|
343
339
|
visibility: Visibility
|
|
344
340
|
"""The current visibility."""
|
|
345
341
|
|
|
346
|
-
current_conditions_history: CurrentConditionsHistory = field(
|
|
347
|
-
metadata={"alias": "currentConditionsHistory"}
|
|
348
|
-
)
|
|
342
|
+
current_conditions_history: CurrentConditionsHistory = field(metadata={"alias": "currentConditionsHistory"})
|
|
349
343
|
"""The changes in the current conditions over the last 24 hours."""
|
|
350
344
|
|
|
351
345
|
is_daytime: bool = field(metadata={"alias": "isDaytime"})
|
|
@@ -406,9 +400,7 @@ class ForecastDayPart(DataClassJSONMixin):
|
|
|
406
400
|
cloud_cover: int = field(metadata={"alias": "cloudCover"})
|
|
407
401
|
"""Average cloud cover percent."""
|
|
408
402
|
|
|
409
|
-
ice_thickness: IceThickness | None = field(
|
|
410
|
-
default=None, metadata={"alias": "iceThickness"}
|
|
411
|
-
)
|
|
403
|
+
ice_thickness: IceThickness | None = field(default=None, metadata={"alias": "iceThickness"})
|
|
412
404
|
"""The forecasted ice thickness."""
|
|
413
405
|
|
|
414
406
|
|
|
@@ -443,14 +435,10 @@ class MoonEvents(DataClassJSONMixin):
|
|
|
443
435
|
moon_phase: MoonPhase = field(metadata={"alias": "moonPhase"})
|
|
444
436
|
"""The moon phase (a.k.a. lunar phase)."""
|
|
445
437
|
|
|
446
|
-
moonrise_times: list[str] = field(
|
|
447
|
-
default_factory=list, metadata={"alias": "moonriseTimes"}
|
|
448
|
-
)
|
|
438
|
+
moonrise_times: list[str] = field(default_factory=list, metadata={"alias": "moonriseTimes"})
|
|
449
439
|
"""The time(s) when the upper limb of the moon appears above the horizon."""
|
|
450
440
|
|
|
451
|
-
moonset_times: list[str] = field(
|
|
452
|
-
default_factory=list, metadata={"alias": "moonsetTimes"}
|
|
453
|
-
)
|
|
441
|
+
moonset_times: list[str] = field(default_factory=list, metadata={"alias": "moonsetTimes"})
|
|
454
442
|
"""The time(s) when the upper limb of the moon disappears below the horizon."""
|
|
455
443
|
|
|
456
444
|
|
|
@@ -476,14 +464,10 @@ class ForecastDay(DataClassJSONMixin):
|
|
|
476
464
|
min_temperature: Temperature = field(metadata={"alias": "minTemperature"})
|
|
477
465
|
"""The minimum (low) temperature throughout the day."""
|
|
478
466
|
|
|
479
|
-
feels_like_max_temperature: Temperature = field(
|
|
480
|
-
metadata={"alias": "feelsLikeMaxTemperature"}
|
|
481
|
-
)
|
|
467
|
+
feels_like_max_temperature: Temperature = field(metadata={"alias": "feelsLikeMaxTemperature"})
|
|
482
468
|
"""The maximum (high) feels-like temperature throughout the day."""
|
|
483
469
|
|
|
484
|
-
feels_like_min_temperature: Temperature = field(
|
|
485
|
-
metadata={"alias": "feelsLikeMinTemperature"}
|
|
486
|
-
)
|
|
470
|
+
feels_like_min_temperature: Temperature = field(metadata={"alias": "feelsLikeMinTemperature"})
|
|
487
471
|
"""The minimum (low) feels-like temperature throughout the day."""
|
|
488
472
|
|
|
489
473
|
max_heat_index: Temperature = field(metadata={"alias": "maxHeatIndex"})
|
|
@@ -495,9 +479,7 @@ class ForecastDay(DataClassJSONMixin):
|
|
|
495
479
|
moon_events: MoonEvents = field(metadata={"alias": "moonEvents"})
|
|
496
480
|
"""The events related to the moon (e.g. moonrise, moonset)."""
|
|
497
481
|
|
|
498
|
-
ice_thickness: IceThickness | None = field(
|
|
499
|
-
default=None, metadata={"alias": "iceThickness"}
|
|
500
|
-
)
|
|
482
|
+
ice_thickness: IceThickness | None = field(default=None, metadata={"alias": "iceThickness"})
|
|
501
483
|
"""The accumulated amount of ice throughout the entire day."""
|
|
502
484
|
|
|
503
485
|
|
|
@@ -511,9 +493,7 @@ class DailyForecastResponse(DataClassJSONMixin):
|
|
|
511
493
|
time_zone: TimeZone = field(metadata={"alias": "timeZone"})
|
|
512
494
|
"""The time zone at the requested location."""
|
|
513
495
|
|
|
514
|
-
next_page_token: str | None = field(
|
|
515
|
-
default=None, metadata={"alias": "nextPageToken"}
|
|
516
|
-
)
|
|
496
|
+
next_page_token: str | None = field(default=None, metadata={"alias": "nextPageToken"})
|
|
517
497
|
"""The token to retrieve the next page."""
|
|
518
498
|
|
|
519
499
|
|
|
@@ -565,9 +545,7 @@ class ForecastHour(DataClassJSONMixin):
|
|
|
565
545
|
temperature: Temperature
|
|
566
546
|
"""The forecasted temperature."""
|
|
567
547
|
|
|
568
|
-
feels_like_temperature: Temperature = field(
|
|
569
|
-
metadata={"alias": "feelsLikeTemperature"}
|
|
570
|
-
)
|
|
548
|
+
feels_like_temperature: Temperature = field(metadata={"alias": "feelsLikeTemperature"})
|
|
571
549
|
"""The measure of how the temperature will feel like."""
|
|
572
550
|
|
|
573
551
|
dew_point: Temperature = field(metadata={"alias": "dewPoint"})
|
|
@@ -609,9 +587,7 @@ class ForecastHour(DataClassJSONMixin):
|
|
|
609
587
|
cloud_cover: int = field(metadata={"alias": "cloudCover"})
|
|
610
588
|
"""The forecasted percentage of the sky covered by clouds (0-100)."""
|
|
611
589
|
|
|
612
|
-
ice_thickness: IceThickness | None = field(
|
|
613
|
-
default=None, metadata={"alias": "iceThickness"}
|
|
614
|
-
)
|
|
590
|
+
ice_thickness: IceThickness | None = field(default=None, metadata={"alias": "iceThickness"})
|
|
615
591
|
"""The forecasted ice thickness."""
|
|
616
592
|
|
|
617
593
|
|
|
@@ -625,7 +601,5 @@ class HourlyForecastResponse(DataClassJSONMixin):
|
|
|
625
601
|
time_zone: TimeZone = field(metadata={"alias": "timeZone"})
|
|
626
602
|
"""The time zone at the requested location."""
|
|
627
603
|
|
|
628
|
-
next_page_token: str | None = field(
|
|
629
|
-
default=None, metadata={"alias": "nextPageToken"}
|
|
630
|
-
)
|
|
604
|
+
next_page_token: str | None = field(default=None, metadata={"alias": "nextPageToken"})
|
|
631
605
|
"""The token to retrieve the next page."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-google-weather-api
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: A python client library for Google Weather API
|
|
5
5
|
Author-email: tronikos <tronikos@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -11,8 +11,8 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: aiohttp>=3.8
|
|
13
13
|
Requires-Dist: mashumaro
|
|
14
|
-
Provides-Extra:
|
|
15
|
-
Requires-Dist: pytest
|
|
14
|
+
Provides-Extra: test
|
|
15
|
+
Requires-Dist: pytest; extra == "test"
|
|
16
16
|
Dynamic: license-file
|
|
17
17
|
|
|
18
18
|
# python-google-weather-api
|
|
@@ -42,12 +42,8 @@ python -m pip install pre-commit
|
|
|
42
42
|
pre-commit install
|
|
43
43
|
pre-commit run --all-files
|
|
44
44
|
|
|
45
|
-
# Alternative: run formatter, lint, and type checking
|
|
46
|
-
python -m pip install isort black flake8 ruff mypy
|
|
47
|
-
isort . ; black . ; flake8 . ; ruff check . --fix ; mypy --install-types .
|
|
48
|
-
|
|
49
45
|
# Run tests
|
|
50
|
-
python -m pip install
|
|
46
|
+
python -m pip install -e ".[test]"
|
|
51
47
|
pytest
|
|
52
48
|
|
|
53
49
|
# Build package
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "python-google-weather-api"
|
|
3
|
-
version = "0.0.4"
|
|
4
|
-
license = "Apache-2.0"
|
|
5
|
-
authors = [
|
|
6
|
-
{ name="tronikos", email="tronikos@gmail.com" },
|
|
7
|
-
]
|
|
8
|
-
description = "A python client library for Google Weather API"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.11"
|
|
11
|
-
dependencies = [
|
|
12
|
-
"aiohttp>=3.8",
|
|
13
|
-
"mashumaro",
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
[project.urls]
|
|
17
|
-
"Homepage" = "https://github.com/tronikos/python-google-weather-api"
|
|
18
|
-
"Bug Tracker" = "https://github.com/tronikos/python-google-weather-api/issues"
|
|
19
|
-
|
|
20
|
-
[build-system]
|
|
21
|
-
requires = ["setuptools"]
|
|
22
|
-
build-backend = "setuptools.build_meta"
|
|
23
|
-
|
|
24
|
-
[tool.black]
|
|
25
|
-
extend-exclude = "_pb2.py|_pb2_grpc.py"
|
|
26
|
-
|
|
27
|
-
[tool.isort]
|
|
28
|
-
profile = "black"
|
|
29
|
-
force_sort_within_sections = true
|
|
30
|
-
combine_as_imports = true
|
|
31
|
-
extend_skip_glob = ["*_pb2.py", "*_pb2_grpc.py"]
|
|
32
|
-
|
|
33
|
-
[tool.ruff]
|
|
34
|
-
target-version = "py311"
|
|
35
|
-
exclude = ["*_pb2.py", "*_pb2_grpc.py", "*.pyi"]
|
|
36
|
-
line-length = 127
|
|
37
|
-
|
|
38
|
-
lint.select = [
|
|
39
|
-
"B007", # Loop control variable {name} not used within loop body
|
|
40
|
-
"B014", # Exception handler with duplicate exception
|
|
41
|
-
"C", # complexity
|
|
42
|
-
"D", # docstrings
|
|
43
|
-
"E", # pycodestyle
|
|
44
|
-
"F", # pyflakes/autoflake
|
|
45
|
-
"ICN001", # import concentions; {name} should be imported as {asname}
|
|
46
|
-
"PGH004", # Use specific rule codes when using noqa
|
|
47
|
-
"PLC0414", # Useless import alias. Import alias does not rename original package.
|
|
48
|
-
"SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass
|
|
49
|
-
"SIM117", # Merge with-statements that use the same scope
|
|
50
|
-
"SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys()
|
|
51
|
-
"SIM201", # Use {left} != {right} instead of not {left} == {right}
|
|
52
|
-
"SIM212", # Use {a} if {a} else {b} instead of {b} if not {a} else {a}
|
|
53
|
-
"SIM300", # Yoda conditions. Use 'age == 42' instead of '42 == age'.
|
|
54
|
-
"SIM401", # Use get from dict with default instead of an if block
|
|
55
|
-
"T20", # flake8-print
|
|
56
|
-
"TRY004", # Prefer TypeError exception for invalid type
|
|
57
|
-
"RUF006", # Store a reference to the return value of asyncio.create_task
|
|
58
|
-
"UP", # pyupgrade
|
|
59
|
-
"W", # pycodestyle
|
|
60
|
-
]
|
|
61
|
-
|
|
62
|
-
lint.ignore = [
|
|
63
|
-
"D203", # 1 blank line required before class docstring
|
|
64
|
-
"D213", # Multi-line docstring summary should start at the second line
|
|
65
|
-
# keep-runtime-annotations
|
|
66
|
-
'UP006', # Non PEP585 annotations
|
|
67
|
-
'UP007', # Non PEP604 annotations
|
|
68
|
-
]
|
|
69
|
-
|
|
70
|
-
[tool.ruff.lint.flake8-pytest-style]
|
|
71
|
-
fixture-parentheses = false
|
|
72
|
-
|
|
73
|
-
[tool.ruff.lint.per-file-ignores]
|
|
74
|
-
# Allow for main script to write to stdout
|
|
75
|
-
"__main__.py" = ["T201"]
|
|
76
|
-
|
|
77
|
-
[tool.ruff.lint.mccabe]
|
|
78
|
-
max-complexity = 25
|
|
79
|
-
|
|
80
|
-
[project.optional-dependencies]
|
|
81
|
-
dev = [
|
|
82
|
-
"pytest>=7",
|
|
83
|
-
]
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[flake8]
|
|
2
|
-
exclude = .venv,.git,docs,venv,bin,lib,deps,build,*_pb2.py,*_pb2_grpc.py
|
|
3
|
-
max-complexity = 25
|
|
4
|
-
doctests = True
|
|
5
|
-
ignore =
|
|
6
|
-
E501,
|
|
7
|
-
W503,
|
|
8
|
-
E203,
|
|
9
|
-
D202,
|
|
10
|
-
W504
|
|
11
|
-
noqa-require-code = True
|
|
12
|
-
|
|
13
|
-
[egg_info]
|
|
14
|
-
tag_build =
|
|
15
|
-
tag_date = 0
|
|
16
|
-
|
|
File without changes
|
{python_google_weather_api-0.0.4 → python_google_weather_api-0.0.6}/src/google_weather_api/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|