renault-api 0.5.1__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.
Files changed (42) hide show
  1. renault_api-0.5.1/LICENSE.rst +22 -0
  2. renault_api-0.5.1/PKG-INFO +205 -0
  3. renault_api-0.5.1/README.rst +174 -0
  4. renault_api-0.5.1/pyproject.toml +157 -0
  5. renault_api-0.5.1/src/renault_api/__init__.py +1 -0
  6. renault_api-0.5.1/src/renault_api/cli/__init__.py +1 -0
  7. renault_api-0.5.1/src/renault_api/cli/__main__.py +272 -0
  8. renault_api-0.5.1/src/renault_api/cli/charge/__init__.py +1 -0
  9. renault_api-0.5.1/src/renault_api/cli/charge/commands.py +21 -0
  10. renault_api-0.5.1/src/renault_api/cli/charge/control.py +66 -0
  11. renault_api-0.5.1/src/renault_api/cli/charge/history.py +126 -0
  12. renault_api-0.5.1/src/renault_api/cli/charge/schedule.py +263 -0
  13. renault_api-0.5.1/src/renault_api/cli/helpers.py +204 -0
  14. renault_api-0.5.1/src/renault_api/cli/hvac/__init__.py +1 -0
  15. renault_api-0.5.1/src/renault_api/cli/hvac/commands.py +18 -0
  16. renault_api-0.5.1/src/renault_api/cli/hvac/control.py +58 -0
  17. renault_api-0.5.1/src/renault_api/cli/hvac/history.py +55 -0
  18. renault_api-0.5.1/src/renault_api/cli/renault_account.py +120 -0
  19. renault_api-0.5.1/src/renault_api/cli/renault_client.py +165 -0
  20. renault_api-0.5.1/src/renault_api/cli/renault_settings.py +61 -0
  21. renault_api-0.5.1/src/renault_api/cli/renault_vehicle.py +403 -0
  22. renault_api-0.5.1/src/renault_api/const.py +205 -0
  23. renault_api-0.5.1/src/renault_api/credential.py +35 -0
  24. renault_api-0.5.1/src/renault_api/credential_store.py +124 -0
  25. renault_api-0.5.1/src/renault_api/exceptions.py +24 -0
  26. renault_api-0.5.1/src/renault_api/gigya/__init__.py +114 -0
  27. renault_api-0.5.1/src/renault_api/gigya/exceptions.py +24 -0
  28. renault_api-0.5.1/src/renault_api/gigya/models.py +94 -0
  29. renault_api-0.5.1/src/renault_api/gigya/schemas.py +25 -0
  30. renault_api-0.5.1/src/renault_api/helpers.py +130 -0
  31. renault_api-0.5.1/src/renault_api/kamereon/__init__.py +356 -0
  32. renault_api-0.5.1/src/renault_api/kamereon/enums.py +37 -0
  33. renault_api-0.5.1/src/renault_api/kamereon/exceptions.py +66 -0
  34. renault_api-0.5.1/src/renault_api/kamereon/helpers.py +118 -0
  35. renault_api-0.5.1/src/renault_api/kamereon/models.py +1041 -0
  36. renault_api-0.5.1/src/renault_api/kamereon/schemas.py +138 -0
  37. renault_api-0.5.1/src/renault_api/models.py +27 -0
  38. renault_api-0.5.1/src/renault_api/py.typed +0 -0
  39. renault_api-0.5.1/src/renault_api/renault_account.py +84 -0
  40. renault_api-0.5.1/src/renault_api/renault_client.py +69 -0
  41. renault_api-0.5.1/src/renault_api/renault_session.py +277 -0
  42. renault_api-0.5.1/src/renault_api/renault_vehicle.py +610 -0
@@ -0,0 +1,22 @@
1
+ MIT License
2
+ ===========
3
+
4
+ Copyright © 2020 epenet
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ **The software is provided "as is", without warranty of any kind, express or
17
+ implied, including but not limited to the warranties of merchantability,
18
+ fitness for a particular purpose and noninfringement. In no event shall the
19
+ authors or copyright holders be liable for any claim, damages or other
20
+ liability, whether in an action of contract, tort or otherwise, arising from,
21
+ out of or in connection with the software or the use or other dealings in the
22
+ software.**
@@ -0,0 +1,205 @@
1
+ Metadata-Version: 2.4
2
+ Name: renault-api
3
+ Version: 0.5.1
4
+ Summary: Renault API
5
+ License: MIT
6
+ License-File: LICENSE.rst
7
+ Author: epenet
8
+ Requires-Python: >=3.10,<4.0
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Provides-Extra: cli
17
+ Requires-Dist: PyJWT (>=2.8.0)
18
+ Requires-Dist: aiohttp (>=3.9.5)
19
+ Requires-Dist: cffi (>=1.17.0)
20
+ Requires-Dist: click (>=8.0.1) ; extra == "cli"
21
+ Requires-Dist: cryptography (>=44.0.0)
22
+ Requires-Dist: dateparser (>=1.0.0) ; extra == "cli"
23
+ Requires-Dist: marshmallow-dataclass (>=8.2.0)
24
+ Requires-Dist: tabulate (>=0.8.7) ; extra == "cli"
25
+ Project-URL: Changelog, https://github.com/hacf-fr/renault-api/releases
26
+ Project-URL: Documentation, https://renault-api.readthedocs.io
27
+ Project-URL: Homepage, https://github.com/hacf-fr/renault-api
28
+ Project-URL: Repository, https://github.com/hacf-fr/renault-api
29
+ Description-Content-Type: text/x-rst
30
+
31
+ Renault API
32
+ ===========
33
+
34
+ |PyPI| |Python Version| |License|
35
+
36
+ |Read the Docs| |Tests| |Codecov|
37
+
38
+ |pre-commit| |Ruff|
39
+
40
+ .. |PyPI| image:: https://img.shields.io/pypi/v/renault-api.svg
41
+ :target: https://pypi.org/project/renault-api/
42
+ :alt: PyPI
43
+ .. |Python Version| image:: https://img.shields.io/pypi/pyversions/renault-api
44
+ :target: https://pypi.org/project/renault-api
45
+ :alt: Python Version
46
+ .. |License| image:: https://img.shields.io/pypi/l/renault-api
47
+ :target: https://opensource.org/licenses/MIT
48
+ :alt: License
49
+ .. |Read the Docs| image:: https://img.shields.io/readthedocs/renault-api/latest.svg?label=Read%20the%20Docs
50
+ :target: https://renault-api.readthedocs.io/
51
+ :alt: Read the documentation at https://renault-api.readthedocs.io/
52
+ .. |Tests| image:: https://github.com/hacf-fr/renault-api/workflows/Tests/badge.svg
53
+ :target: https://github.com/hacf-fr/renault-api/actions?workflow=Tests
54
+ :alt: Tests
55
+ .. |Codecov| image:: https://codecov.io/gh/hacf-fr/renault-api/branch/main/graph/badge.svg
56
+ :target: https://codecov.io/gh/hacf-fr/renault-api
57
+ :alt: Codecov
58
+ .. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
59
+ :target: https://github.com/pre-commit/pre-commit
60
+ :alt: pre-commit
61
+ .. |Ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
62
+ :target: https://github.com/astral-sh/ruff
63
+ :alt: Ruff
64
+
65
+
66
+ Features
67
+ --------
68
+
69
+ This Python package manages the communication with the private Renault API used by the official MyRenault application.
70
+
71
+ The client is able to read various vehicle attributes, such as:
72
+
73
+ * mileage
74
+ * GPS location
75
+ * fuel autonomy (for fuel vehicles)
76
+ * battery autonomy (for electric vehicles)
77
+ * contracts associated to the vehicle (warranty and connected services)
78
+
79
+ For some vehicles, it is also possible to manage:
80
+
81
+ * hvac/pre-conditionning of the vehicle
82
+ * charge schedule
83
+
84
+ This package has been developed to be used with Home-Assistant, but it can be used in other contexts
85
+
86
+
87
+ Requirements
88
+ ------------
89
+
90
+ * Python (>= 3.10)
91
+
92
+ API Usage
93
+ ---------
94
+
95
+ You can install *Renault API* via pip_ from PyPI_:
96
+
97
+ .. code:: console
98
+
99
+ $ pip install renault-api
100
+
101
+ .. code:: python
102
+
103
+ import aiohttp
104
+ import asyncio
105
+
106
+ from renault_api.renault_client import RenaultClient
107
+
108
+ async def main():
109
+ async with aiohttp.ClientSession() as websession:
110
+ client = RenaultClient(websession=websession, locale="fr_FR")
111
+ await client.session.login('email', 'password')
112
+ print(f"Accounts: {await client.get_person()}") # List available accounts, make a note of kamereon account id
113
+
114
+ account_id = "Your Kamereon account id"
115
+ account = await client.get_api_account(account_id)
116
+ print(f"Vehicles: {await account.get_vehicles()}") # List available vehicles, make a note of vehicle VIN
117
+
118
+ vin = "Your vehicle VIN"
119
+ vehicle = await account.get_api_vehicle(vin)
120
+ print(f"Cockpit information: {await vehicle.get_cockpit()}")
121
+ print(f"Battery status information: {await vehicle.get_battery_status()}")
122
+
123
+ loop = asyncio.get_event_loop()
124
+ loop.run_until_complete(main())
125
+
126
+ CLI Usage
127
+ ---------
128
+
129
+ The renault-api is also available through a CLI, which requires additional dependencies.
130
+ For the added dependencies, you can install *Renault API* via pip_ from PyPI_:
131
+
132
+ .. code:: console
133
+
134
+ $ pip install renault-api[cli]
135
+
136
+ Once installed, the following command prompts for credentials and settings, displays basic vehicle status information, and generates traces:
137
+
138
+ .. code:: console
139
+
140
+ $ renault-api --log status
141
+
142
+ * Credentials will automatically be stored in the user home directory (~/.credentials/renault-api.json)
143
+ * Logs will automatically be generated in `logs` subfolder
144
+
145
+ It is also possible to use raw http GET/POST commands, for example to get odometer and others data on a Windows machine:
146
+
147
+ .. code:: console
148
+
149
+ C:> renault-api http get /commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v1/cars/{vin}/cockpit
150
+
151
+ Or to request a battery status refresh on a Windows Machine (internal quotes escaped, whole payload enclosed in un-escaped quotes):
152
+
153
+ .. code:: console
154
+
155
+ C:> renault-api http post /commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v1/cars/{vin}/actions/refresh-battery-status "{\\"data\\": {\\"type\\": \\"RefreshBatteryStatus\\"}}"
156
+
157
+ Please see the `Command-line Reference <Usage_>`_ for full details.
158
+
159
+ Contributing
160
+ ------------
161
+
162
+ Contributions are very welcome.
163
+ To learn more, see the `Contributor Guide`_.
164
+
165
+
166
+ License
167
+ -------
168
+
169
+ Distributed under the terms of the MIT_ license,
170
+ *Renault API* is free and open source software.
171
+
172
+
173
+ Disclaimer
174
+ ----------
175
+
176
+ This project is not affiliated with, endorsed by, or connected to Renault. I accept no responsibility for any consequences, intended or accidental, as a as a result of interacting with Renault's API using this project.
177
+
178
+
179
+ Issues
180
+ ------
181
+
182
+ If you encounter any problems,
183
+ please `file an issue`_ along with a detailed description.
184
+
185
+
186
+ Credits
187
+ -------
188
+
189
+ This project was generated from `@cjolowicz`_'s `Hypermodern Python Cookiecutter`_ template.
190
+ This project was heavily based on `@jamesremuscat`_'s `PyZE`_ python client for the Renault ZE API.
191
+
192
+
193
+ .. _@cjolowicz: https://github.com/cjolowicz
194
+ .. _Cookiecutter: https://github.com/audreyr/cookiecutter
195
+ .. _@jamesremuscat: https://github.com/jamesremuscat
196
+ .. _PyZE: https://github.com/jamesremuscat/pyze
197
+ .. _MIT: http://opensource.org/licenses/MIT
198
+ .. _PyPI: https://pypi.org/
199
+ .. _Hypermodern Python Cookiecutter: https://github.com/cjolowicz/cookiecutter-hypermodern-python
200
+ .. _file an issue: https://github.com/hacf-fr/renault-api/issues
201
+ .. _pip: https://pip.pypa.io/
202
+ .. github-only
203
+ .. _Contributor Guide: CONTRIBUTING.rst
204
+ .. _Usage: https://renault-api.readthedocs.io/en/latest/usage.html
205
+
@@ -0,0 +1,174 @@
1
+ Renault API
2
+ ===========
3
+
4
+ |PyPI| |Python Version| |License|
5
+
6
+ |Read the Docs| |Tests| |Codecov|
7
+
8
+ |pre-commit| |Ruff|
9
+
10
+ .. |PyPI| image:: https://img.shields.io/pypi/v/renault-api.svg
11
+ :target: https://pypi.org/project/renault-api/
12
+ :alt: PyPI
13
+ .. |Python Version| image:: https://img.shields.io/pypi/pyversions/renault-api
14
+ :target: https://pypi.org/project/renault-api
15
+ :alt: Python Version
16
+ .. |License| image:: https://img.shields.io/pypi/l/renault-api
17
+ :target: https://opensource.org/licenses/MIT
18
+ :alt: License
19
+ .. |Read the Docs| image:: https://img.shields.io/readthedocs/renault-api/latest.svg?label=Read%20the%20Docs
20
+ :target: https://renault-api.readthedocs.io/
21
+ :alt: Read the documentation at https://renault-api.readthedocs.io/
22
+ .. |Tests| image:: https://github.com/hacf-fr/renault-api/workflows/Tests/badge.svg
23
+ :target: https://github.com/hacf-fr/renault-api/actions?workflow=Tests
24
+ :alt: Tests
25
+ .. |Codecov| image:: https://codecov.io/gh/hacf-fr/renault-api/branch/main/graph/badge.svg
26
+ :target: https://codecov.io/gh/hacf-fr/renault-api
27
+ :alt: Codecov
28
+ .. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
29
+ :target: https://github.com/pre-commit/pre-commit
30
+ :alt: pre-commit
31
+ .. |Ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
32
+ :target: https://github.com/astral-sh/ruff
33
+ :alt: Ruff
34
+
35
+
36
+ Features
37
+ --------
38
+
39
+ This Python package manages the communication with the private Renault API used by the official MyRenault application.
40
+
41
+ The client is able to read various vehicle attributes, such as:
42
+
43
+ * mileage
44
+ * GPS location
45
+ * fuel autonomy (for fuel vehicles)
46
+ * battery autonomy (for electric vehicles)
47
+ * contracts associated to the vehicle (warranty and connected services)
48
+
49
+ For some vehicles, it is also possible to manage:
50
+
51
+ * hvac/pre-conditionning of the vehicle
52
+ * charge schedule
53
+
54
+ This package has been developed to be used with Home-Assistant, but it can be used in other contexts
55
+
56
+
57
+ Requirements
58
+ ------------
59
+
60
+ * Python (>= 3.10)
61
+
62
+ API Usage
63
+ ---------
64
+
65
+ You can install *Renault API* via pip_ from PyPI_:
66
+
67
+ .. code:: console
68
+
69
+ $ pip install renault-api
70
+
71
+ .. code:: python
72
+
73
+ import aiohttp
74
+ import asyncio
75
+
76
+ from renault_api.renault_client import RenaultClient
77
+
78
+ async def main():
79
+ async with aiohttp.ClientSession() as websession:
80
+ client = RenaultClient(websession=websession, locale="fr_FR")
81
+ await client.session.login('email', 'password')
82
+ print(f"Accounts: {await client.get_person()}") # List available accounts, make a note of kamereon account id
83
+
84
+ account_id = "Your Kamereon account id"
85
+ account = await client.get_api_account(account_id)
86
+ print(f"Vehicles: {await account.get_vehicles()}") # List available vehicles, make a note of vehicle VIN
87
+
88
+ vin = "Your vehicle VIN"
89
+ vehicle = await account.get_api_vehicle(vin)
90
+ print(f"Cockpit information: {await vehicle.get_cockpit()}")
91
+ print(f"Battery status information: {await vehicle.get_battery_status()}")
92
+
93
+ loop = asyncio.get_event_loop()
94
+ loop.run_until_complete(main())
95
+
96
+ CLI Usage
97
+ ---------
98
+
99
+ The renault-api is also available through a CLI, which requires additional dependencies.
100
+ For the added dependencies, you can install *Renault API* via pip_ from PyPI_:
101
+
102
+ .. code:: console
103
+
104
+ $ pip install renault-api[cli]
105
+
106
+ Once installed, the following command prompts for credentials and settings, displays basic vehicle status information, and generates traces:
107
+
108
+ .. code:: console
109
+
110
+ $ renault-api --log status
111
+
112
+ * Credentials will automatically be stored in the user home directory (~/.credentials/renault-api.json)
113
+ * Logs will automatically be generated in `logs` subfolder
114
+
115
+ It is also possible to use raw http GET/POST commands, for example to get odometer and others data on a Windows machine:
116
+
117
+ .. code:: console
118
+
119
+ C:> renault-api http get /commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v1/cars/{vin}/cockpit
120
+
121
+ Or to request a battery status refresh on a Windows Machine (internal quotes escaped, whole payload enclosed in un-escaped quotes):
122
+
123
+ .. code:: console
124
+
125
+ C:> renault-api http post /commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v1/cars/{vin}/actions/refresh-battery-status "{\\"data\\": {\\"type\\": \\"RefreshBatteryStatus\\"}}"
126
+
127
+ Please see the `Command-line Reference <Usage_>`_ for full details.
128
+
129
+ Contributing
130
+ ------------
131
+
132
+ Contributions are very welcome.
133
+ To learn more, see the `Contributor Guide`_.
134
+
135
+
136
+ License
137
+ -------
138
+
139
+ Distributed under the terms of the MIT_ license,
140
+ *Renault API* is free and open source software.
141
+
142
+
143
+ Disclaimer
144
+ ----------
145
+
146
+ This project is not affiliated with, endorsed by, or connected to Renault. I accept no responsibility for any consequences, intended or accidental, as a as a result of interacting with Renault's API using this project.
147
+
148
+
149
+ Issues
150
+ ------
151
+
152
+ If you encounter any problems,
153
+ please `file an issue`_ along with a detailed description.
154
+
155
+
156
+ Credits
157
+ -------
158
+
159
+ This project was generated from `@cjolowicz`_'s `Hypermodern Python Cookiecutter`_ template.
160
+ This project was heavily based on `@jamesremuscat`_'s `PyZE`_ python client for the Renault ZE API.
161
+
162
+
163
+ .. _@cjolowicz: https://github.com/cjolowicz
164
+ .. _Cookiecutter: https://github.com/audreyr/cookiecutter
165
+ .. _@jamesremuscat: https://github.com/jamesremuscat
166
+ .. _PyZE: https://github.com/jamesremuscat/pyze
167
+ .. _MIT: http://opensource.org/licenses/MIT
168
+ .. _PyPI: https://pypi.org/
169
+ .. _Hypermodern Python Cookiecutter: https://github.com/cjolowicz/cookiecutter-hypermodern-python
170
+ .. _file an issue: https://github.com/hacf-fr/renault-api/issues
171
+ .. _pip: https://pip.pypa.io/
172
+ .. github-only
173
+ .. _Contributor Guide: CONTRIBUTING.rst
174
+ .. _Usage: https://renault-api.readthedocs.io/en/latest/usage.html
@@ -0,0 +1,157 @@
1
+ [tool.poetry]
2
+ name = "renault-api"
3
+ version = "0.5.1"
4
+ description = "Renault API"
5
+ authors = ["epenet"]
6
+ license = "MIT"
7
+ readme = "README.rst"
8
+ homepage = "https://github.com/hacf-fr/renault-api"
9
+ repository = "https://github.com/hacf-fr/renault-api"
10
+ documentation = "https://renault-api.readthedocs.io"
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3.10",
13
+ "Programming Language :: Python :: 3.11",
14
+ "Programming Language :: Python :: 3.12",
15
+ "Programming Language :: Python :: 3.13",
16
+ ]
17
+
18
+ [tool.poetry.urls]
19
+ Changelog = "https://github.com/hacf-fr/renault-api/releases"
20
+
21
+ [tool.poetry.requires-plugins]
22
+ poetry-plugin-export = ">=1.8"
23
+
24
+ [tool.poetry.dependencies]
25
+ python = ">=3.10,<4.0"
26
+ # Warning: as of 2024-04-23, aiohttp is pinned to 3.9.5 on HA-core
27
+ aiohttp = ">=3.9.5"
28
+ # Warning: as of 2023-07-19, pyjwt is pinned to 2.8.0 on HA-core
29
+ PyJWT = ">=2.8.0"
30
+ #ensure cryptography (for pyjwt) is greater than 44.0.0 to account for CVE-2024-12797
31
+ cryptography = ">=44.0.0"
32
+ #ensure cffi (for cryptography) is greater than 1.17.0 for python 3.13 compatibility
33
+ cffi = ">=1.17.0"
34
+
35
+ marshmallow-dataclass = ">=8.2.0"
36
+ click = { version = ">=8.0.1", optional = true }
37
+ tabulate = { version = ">=0.8.7", optional = true }
38
+ dateparser = {version = ">=1.0.0", optional = true}
39
+ #ensure six (for dateparser) is greater than 1.16 for python 3.12 compatibility
40
+ six = {version = "^1.16", optional = true}
41
+
42
+ [tool.poetry.group.dev.dependencies]
43
+ pytest = ">=7.3.1,<10.0.0"
44
+ coverage = {extras = ["toml"], version = "^7.2"}
45
+ safety = ">=2.3.5,<4.0.0"
46
+ mypy = "^1.2"
47
+ typeguard = ">=4.1.3,<5.0.0"
48
+ xdoctest = {extras = ["colors"], version = "^1.1.1"}
49
+ sphinx = ">=4.3.2,<9.0.0"
50
+ sphinx-autobuild = ">=2021.3.14,<2025.0.0"
51
+ pre-commit = ">=2.21,<5.0"
52
+ ruff = ">=0.3.7"
53
+ darglint = "^1.8.1"
54
+ pre-commit-hooks = ">=4.4,<7.0"
55
+ sphinx-rtd-theme = ">=1.2,<4.0"
56
+ sphinx-click = ">=4.4,<7.0"
57
+ Pygments = "^2.15.0"
58
+ pytest-asyncio = ">=0.21,<1.4"
59
+ aioresponses = "^0.7.4"
60
+ pytest-cov = ">=4,<8"
61
+ syrupy = ">=4.9.1"
62
+ #ensure urllib3 (for requests/sphinx) is greater than 1.26.5 to account for CVE-2021-33503
63
+ urllib3 = ">=1.26.15,<3.0.0"
64
+ #ensure certifi (for requests/sphinx) is greater than 2023.7.22 to account for CVE-2023-37920
65
+ certifi = ">=2023.7.22,<2026.0.0"
66
+ #ensure requests (for sphinx) is greater than 2.31.0 to account for CVE-2023-32681
67
+ requests = "^2.31.0"
68
+ #ensure tornado (for sphinx) is greater than 6.3.3 to account for GHSA-qppv-j76h-2rpx
69
+ tornado = "^6.3.3"
70
+ #ensure PyYAML (for sphinx) is greater than 6.0.1 to fix Cython wheel
71
+ PyYAML = "^6.0.1"
72
+ #ensure virtualenv (for pre-commit) is greater than 20.21.0 to account for PVE-2024-68477
73
+ virtualenv = ">=20.21.0"
74
+ #ensure nodeenv (for pre-commit) is greater than 1.9.0 for python 3.13 compatibility
75
+ nodeenv = ">=1.9.0"
76
+ #ensure typing-extensions (for safety>pydantic) is greater than 4.12.2 for python 3.13 compatibility
77
+ typing-extensions = ">=4.12.2"
78
+
79
+ [tool.poetry.extras]
80
+ cli = ["click", "tabulate", "dateparser"]
81
+
82
+ [tool.poetry.scripts]
83
+ renault-api = "renault_api.cli.__main__:main"
84
+
85
+ [tool.coverage.paths]
86
+ source = ["src", "*/site-packages"]
87
+
88
+ [tool.coverage.run]
89
+ branch = true
90
+ source = ["renault_api"]
91
+
92
+ [tool.coverage.report]
93
+ show_missing = true
94
+
95
+ [tool.mypy]
96
+ check_untyped_defs = true
97
+ disallow_any_generics = true
98
+ disallow_incomplete_defs = true
99
+ disallow_subclassing_any = true
100
+ disallow_untyped_calls = true
101
+ disallow_untyped_decorators = true
102
+ disallow_untyped_defs = true
103
+ no_implicit_optional = true
104
+ no_implicit_reexport = true
105
+ pretty = true
106
+ show_column_numbers = true
107
+ show_error_codes = true
108
+ show_error_context = true
109
+ strict_equality = true
110
+ warn_redundant_casts = true
111
+ warn_return_any = true
112
+ warn_unreachable = true
113
+ warn_unused_configs = true
114
+ warn_unused_ignores = true
115
+
116
+ [tool.ruff]
117
+ line-length = 88
118
+ target-version = "py310"
119
+
120
+ [tool.ruff.lint]
121
+ ignore = [
122
+ "A001", # Variable is shadowing a Python builtin
123
+ "A002", # Argument is shadowing a Python builtin
124
+ "N815", # Variable in class scope should not be mixedCase
125
+ "PLR0911", # Too many return statements
126
+ "PLR0913", # Too many arguments in function definition
127
+ ]
128
+ select = [
129
+ "A", # flake8-builtins
130
+ "B", # flake8-bugbear
131
+ "C4", # flake8-comprehensions
132
+ "C90", # mccabe
133
+ "E", # pycodestyle error
134
+ "ERA", # eradicate
135
+ "F", # Pyflakes
136
+ "I", # isort
137
+ "N", # pep8-naming
138
+ "PL", # Pylint
139
+ "PT", # flake8-pytest-style
140
+ "UP", # pyupgrade
141
+ ]
142
+
143
+ [tool.ruff.lint.isort]
144
+ force-single-line = true
145
+ known-local-folder = [
146
+ "renault_api",
147
+ ]
148
+
149
+ [tool.ruff.lint.mccabe]
150
+ max-complexity = 10
151
+
152
+ [tool.ruff.lint.pydocstyle]
153
+ convention = "google"
154
+
155
+ [build-system]
156
+ requires = ["poetry-core>=1.0.0"]
157
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1 @@
1
+ """Renault API."""
@@ -0,0 +1 @@
1
+ """Renault CLI."""