rivian-python-client 1.2.0__tar.gz → 1.3.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.2.0 → rivian_python_client-1.3.0}/PKG-INFO +2 -2
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/pyproject.toml +4 -4
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/rivian.py +3 -1
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/ws_monitor.py +6 -1
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/README.md +0 -0
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/__init__.py +0 -0
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/ble.py +0 -0
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/const.py +0 -0
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/exceptions.py +0 -0
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/py.typed +0 -0
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/schemas/charging.graphql +0 -0
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/schemas/gateway.graphql +0 -0
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/schemas/orders.graphql +0 -0
- {rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rivian-python-client
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Rivian API Client (Unofficial)
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Brian Retterer
|
|
@@ -16,7 +16,7 @@ Provides-Extra: ble
|
|
|
16
16
|
Requires-Dist: aiohttp (>=3.0.0)
|
|
17
17
|
Requires-Dist: backports-strenum (>=1.2.4,<2.0.0) ; python_version < "3.11"
|
|
18
18
|
Requires-Dist: bleak (>=0.21,<1.0.0) ; extra == "ble"
|
|
19
|
-
Requires-Dist: cryptography (>=41.0.1,<
|
|
19
|
+
Requires-Dist: cryptography (>=41.0.1,<44.0)
|
|
20
20
|
Requires-Dist: dbus-fast (>=2.11.0,<3.0.0) ; (sys_platform == "linux") and (extra == "ble")
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "rivian-python-client"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.3.0"
|
|
4
4
|
description = "Rivian API Client (Unofficial)"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = ["Brian Retterer <bretterer@gmail.com>"]
|
|
@@ -12,18 +12,18 @@ packages = [
|
|
|
12
12
|
[tool.poetry.dependencies]
|
|
13
13
|
python = ">=3.9,<3.13"
|
|
14
14
|
aiohttp = ">=3.0.0"
|
|
15
|
-
cryptography = ">=41.0.1,<
|
|
15
|
+
cryptography = ">=41.0.1,<44.0"
|
|
16
16
|
backports-strenum = { version = "^1.2.4", python = "<3.11" }
|
|
17
17
|
bleak = { version = ">=0.21,<1.0.0", optional = true }
|
|
18
18
|
dbus-fast = {version = "^2.11.0", optional = true, platform = "linux"}
|
|
19
19
|
|
|
20
20
|
[tool.poetry.group.dev.dependencies]
|
|
21
21
|
pytest = ">=7.1.2,<9.0.0"
|
|
22
|
-
pytest-asyncio = ">=0.18.3,<0.
|
|
22
|
+
pytest-asyncio = ">=0.18.3,<0.25.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 = "
|
|
26
|
+
ruff = ">=0.4,<0.7"
|
|
27
27
|
|
|
28
28
|
[tool.poetry.extras]
|
|
29
29
|
ble = ["bleak", "dbus-fast"]
|
|
@@ -153,7 +153,6 @@ class Rivian:
|
|
|
153
153
|
"Csrf-Token": self._csrf_token,
|
|
154
154
|
"A-Sess": self._app_session_token,
|
|
155
155
|
"Apollographql-Client-Name": APOLLO_CLIENT_NAME,
|
|
156
|
-
"Dc-Cid": f"m-ios-{uuid.uuid4()}",
|
|
157
156
|
}
|
|
158
157
|
|
|
159
158
|
graphql_json = {
|
|
@@ -638,6 +637,9 @@ class Rivian:
|
|
|
638
637
|
self._session = aiohttp.ClientSession()
|
|
639
638
|
self._close_session = True
|
|
640
639
|
|
|
640
|
+
if "dc-cid" not in headers:
|
|
641
|
+
headers["dc-cid"] = f"m-ios-{uuid.uuid4()}"
|
|
642
|
+
|
|
641
643
|
try:
|
|
642
644
|
async with async_timeout.timeout(self.request_timeout):
|
|
643
645
|
response = await self._session.request(
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
|
+
import inspect
|
|
6
7
|
import logging
|
|
7
8
|
import sys
|
|
8
9
|
from collections.abc import Awaitable, Callable
|
|
@@ -151,7 +152,11 @@ class WebSocketMonitor:
|
|
|
151
152
|
self._connection_ack.set()
|
|
152
153
|
elif data_type == "next":
|
|
153
154
|
if (_id := data.get("id")) in self._subscriptions:
|
|
154
|
-
self._subscriptions[_id][0]
|
|
155
|
+
_fn = self._subscriptions[_id][0]
|
|
156
|
+
if inspect.iscoroutinefunction(_fn):
|
|
157
|
+
await _fn(data)
|
|
158
|
+
else:
|
|
159
|
+
_fn(data)
|
|
155
160
|
else:
|
|
156
161
|
self._log_message(msg)
|
|
157
162
|
elif msg.type == WSMsgType.ERROR:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/schemas/charging.graphql
RENAMED
|
File without changes
|
{rivian_python_client-1.2.0 → rivian_python_client-1.3.0}/src/rivian/schemas/gateway.graphql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|