python-chargepoint 2.0.0__tar.gz → 2.1.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.
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/PKG-INFO +23 -1
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/README.md +22 -0
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/pyproject.toml +1 -1
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/python_chargepoint/client.py +12 -0
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/python_chargepoint/types.py +2 -0
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/LICENSE +0 -0
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/python_chargepoint/__init__.py +0 -0
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/python_chargepoint/__main__.py +0 -0
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/python_chargepoint/constants.py +0 -0
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/python_chargepoint/exceptions.py +0 -0
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/python_chargepoint/global_config.py +0 -0
- {python_chargepoint-2.0.0 → python_chargepoint-2.1.0}/python_chargepoint/session.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-chargepoint
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: A simple, Pythonic wrapper for the ChargePoint API.
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -77,6 +77,28 @@ await client.login_with_sso_session("<sso jwt>")
|
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
80
|
+
### Obtaining Tokens Manually
|
|
81
|
+
|
|
82
|
+
Password-based login may be blocked by bot-protection (Datadome). When that happens,
|
|
83
|
+
you can capture a token directly from your browser and pass it to the client.
|
|
84
|
+
|
|
85
|
+
1. Open [https://driver.chargepoint.com](https://driver.chargepoint.com) in your browser and log in normally.
|
|
86
|
+
2. Open Developer Tools and navigate to **Application > Cookies > https://driver.chargepoint.com**.
|
|
87
|
+
3. Copy the value of one of the following cookies:
|
|
88
|
+
|
|
89
|
+
| Cookie | Use as |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `coulomb_sess` | `coulomb_token=` (recommended — long-lived) |
|
|
92
|
+
| `auth-session` | `login_with_sso_session()` (shorter-lived JWT) |
|
|
93
|
+
|
|
94
|
+
> **Note:** The `coulomb_sess` value contains `#` and `?` characters. The library handles both raw and URL-encoded (`%23`, `%3F`) forms automatically. When setting it as a shell environment variable, always wrap the value in **double quotes** to prevent the shell from interpreting `#` as a comment:
|
|
95
|
+
>
|
|
96
|
+
> ```bash
|
|
97
|
+
> export CP_COULOMB_TOKEN="Ab3dEf...token...#D???????#RNA-US"
|
|
98
|
+
> ```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
80
102
|
### Account
|
|
81
103
|
|
|
82
104
|
```python
|
|
@@ -56,6 +56,28 @@ await client.login_with_sso_session("<sso jwt>")
|
|
|
56
56
|
|
|
57
57
|
---
|
|
58
58
|
|
|
59
|
+
### Obtaining Tokens Manually
|
|
60
|
+
|
|
61
|
+
Password-based login may be blocked by bot-protection (Datadome). When that happens,
|
|
62
|
+
you can capture a token directly from your browser and pass it to the client.
|
|
63
|
+
|
|
64
|
+
1. Open [https://driver.chargepoint.com](https://driver.chargepoint.com) in your browser and log in normally.
|
|
65
|
+
2. Open Developer Tools and navigate to **Application > Cookies > https://driver.chargepoint.com**.
|
|
66
|
+
3. Copy the value of one of the following cookies:
|
|
67
|
+
|
|
68
|
+
| Cookie | Use as |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `coulomb_sess` | `coulomb_token=` (recommended — long-lived) |
|
|
71
|
+
| `auth-session` | `login_with_sso_session()` (shorter-lived JWT) |
|
|
72
|
+
|
|
73
|
+
> **Note:** The `coulomb_sess` value contains `#` and `?` characters. The library handles both raw and URL-encoded (`%23`, `%3F`) forms automatically. When setting it as a shell environment variable, always wrap the value in **double quotes** to prevent the shell from interpreting `#` as a comment:
|
|
74
|
+
>
|
|
75
|
+
> ```bash
|
|
76
|
+
> export CP_COULOMB_TOKEN="Ab3dEf...token...#D???????#RNA-US"
|
|
77
|
+
> ```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
59
81
|
### Account
|
|
60
82
|
|
|
61
83
|
```python
|
|
@@ -189,6 +189,18 @@ class ChargePoint:
|
|
|
189
189
|
await self._init_account_parameters()
|
|
190
190
|
return
|
|
191
191
|
|
|
192
|
+
if login.status == 403:
|
|
193
|
+
try:
|
|
194
|
+
body = await login.json(content_type=None)
|
|
195
|
+
if "url" in body:
|
|
196
|
+
raise DatadomeCaptcha(
|
|
197
|
+
body["url"], "Login blocked by Datadome captcha."
|
|
198
|
+
)
|
|
199
|
+
except DatadomeCaptcha:
|
|
200
|
+
raise
|
|
201
|
+
except Exception:
|
|
202
|
+
pass
|
|
203
|
+
|
|
192
204
|
_LOGGER.error(
|
|
193
205
|
"Failed to get auth token! status_code=%s err=%s",
|
|
194
206
|
login.status,
|
|
@@ -384,6 +384,8 @@ class StationInfo(_CamelModel):
|
|
|
384
384
|
parking_accessibility: str = ""
|
|
385
385
|
stop_charge_supported: bool = False
|
|
386
386
|
remote_start_charge: bool = False
|
|
387
|
+
shared_power: bool = False
|
|
388
|
+
reduced_power: bool = False
|
|
387
389
|
station_price: Optional[StationPrice] = None
|
|
388
390
|
device_software_version: str = ""
|
|
389
391
|
last_charged_date: Optional[str] = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|