rivian-python-client 1.1.3__tar.gz → 1.2.0__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.
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/PKG-INFO +1 -1
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/pyproject.toml +6 -1
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/ble.py +1 -0
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/const.py +1 -0
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/rivian.py +8 -2
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/schemas/gateway.graphql +7 -0
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/utils.py +1 -0
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/ws_monitor.py +7 -1
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/README.md +0 -0
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/__init__.py +0 -0
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/exceptions.py +0 -0
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/py.typed +0 -0
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/schemas/charging.graphql +0 -0
- {rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/schemas/orders.graphql +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "rivian-python-client"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.2.0"
|
|
4
4
|
description = "Rivian API Client (Unofficial)"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = ["Brian Retterer <bretterer@gmail.com>"]
|
|
@@ -23,6 +23,7 @@ pytest-asyncio = ">=0.18.3,<0.24.0"
|
|
|
23
23
|
python-dotenv = ">=0.20,<1.1"
|
|
24
24
|
aresponses = ">=2.1.5,<4.0.0"
|
|
25
25
|
mypy = ">=1.7.0,<2.0.0"
|
|
26
|
+
ruff = "^0.4"
|
|
26
27
|
|
|
27
28
|
[tool.poetry.extras]
|
|
28
29
|
ble = ["bleak", "dbus-fast"]
|
|
@@ -33,6 +34,10 @@ vcs = "git"
|
|
|
33
34
|
style = "semver"
|
|
34
35
|
pattern = "default-unprefixed"
|
|
35
36
|
|
|
37
|
+
[tool.ruff.lint.isort]
|
|
38
|
+
combine-as-imports = true
|
|
39
|
+
split-on-trailing-comma = false
|
|
40
|
+
|
|
36
41
|
[build-system]
|
|
37
42
|
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
|
|
38
43
|
build-backend = "poetry_dynamic_versioning.backend"
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"""Asynchronous Python client for the Rivian API."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
import asyncio
|
|
5
6
|
import logging
|
|
6
7
|
import socket
|
|
8
|
+
import sys
|
|
7
9
|
import time
|
|
8
10
|
import uuid
|
|
9
11
|
from collections.abc import Callable
|
|
@@ -11,7 +13,6 @@ from typing import Any, Type
|
|
|
11
13
|
from warnings import warn
|
|
12
14
|
|
|
13
15
|
import aiohttp
|
|
14
|
-
import async_timeout
|
|
15
16
|
from aiohttp import ClientResponse, ClientWebSocketResponse
|
|
16
17
|
|
|
17
18
|
from .const import LIVE_SESSION_PROPERTIES, VEHICLE_STATE_PROPERTIES, VehicleCommand
|
|
@@ -29,6 +30,11 @@ from .exceptions import (
|
|
|
29
30
|
from .utils import generate_vehicle_command_hmac
|
|
30
31
|
from .ws_monitor import WebSocketMonitor
|
|
31
32
|
|
|
33
|
+
if sys.version_info >= (3, 11):
|
|
34
|
+
import asyncio as async_timeout
|
|
35
|
+
else:
|
|
36
|
+
import async_timeout
|
|
37
|
+
|
|
32
38
|
_LOGGER = logging.getLogger(__name__)
|
|
33
39
|
|
|
34
40
|
GRAPHQL_BASEPATH = "https://rivian.com/api/gql"
|
|
@@ -379,7 +385,7 @@ class Rivian:
|
|
|
379
385
|
"U-Sess": self._user_session_token,
|
|
380
386
|
}
|
|
381
387
|
|
|
382
|
-
graphql_query = "query getVehicleImages( $extension: String $resolution: String $versionForVehicle: String $versionForPreOrder: String ) { getVehicleOrderMobileImages( resolution: $resolution extension: $extension version: $versionForPreOrder ) { ...image } getVehicleMobileImages( resolution: $resolution extension: $extension version: $versionForVehicle ) { ...image } } fragment image on VehicleMobileImage { orderId vehicleId url extension resolution size design placement }"
|
|
388
|
+
graphql_query = "query getVehicleImages( $extension: String $resolution: String $versionForVehicle: String $versionForPreOrder: String ) { getVehicleOrderMobileImages( resolution: $resolution extension: $extension version: $versionForPreOrder ) { ...image } getVehicleMobileImages( resolution: $resolution extension: $extension version: $versionForVehicle ) { ...image } } fragment image on VehicleMobileImage { orderId vehicleId url extension resolution size design placement overlays { url overlay zIndex } }"
|
|
383
389
|
|
|
384
390
|
graphql_json = {
|
|
385
391
|
"operationName": "getVehicleImages",
|
{rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/schemas/gateway.graphql
RENAMED
|
@@ -565,6 +565,13 @@ type VehicleMobileImage {
|
|
|
565
565
|
resolution: String!
|
|
566
566
|
size: String!
|
|
567
567
|
url: String!
|
|
568
|
+
overlays: [VehicleMobileImageOverlay!]!
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
type VehicleMobileImageOverlay {
|
|
572
|
+
url: String!
|
|
573
|
+
overlay: String!
|
|
574
|
+
zIndex: Int!
|
|
568
575
|
}
|
|
569
576
|
|
|
570
577
|
type VehicleState {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"""Websocket monitor."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
import asyncio
|
|
5
6
|
import logging
|
|
7
|
+
import sys
|
|
6
8
|
from collections.abc import Awaitable, Callable
|
|
7
9
|
from datetime import datetime, timezone
|
|
8
10
|
from json import loads
|
|
@@ -10,9 +12,13 @@ from random import uniform
|
|
|
10
12
|
from typing import TYPE_CHECKING, Any
|
|
11
13
|
from uuid import uuid4
|
|
12
14
|
|
|
13
|
-
import async_timeout
|
|
14
15
|
from aiohttp import ClientWebSocketResponse, WSMessage, WSMsgType
|
|
15
16
|
|
|
17
|
+
if sys.version_info >= (3, 11):
|
|
18
|
+
import asyncio as async_timeout
|
|
19
|
+
else:
|
|
20
|
+
import async_timeout
|
|
21
|
+
|
|
16
22
|
if TYPE_CHECKING:
|
|
17
23
|
from .rivian import Rivian
|
|
18
24
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rivian_python_client-1.1.3 → rivian_python_client-1.2.0}/src/rivian/schemas/charging.graphql
RENAMED
|
File without changes
|
|
File without changes
|