pySmartHashtag 0.8.2__tar.gz → 0.9.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.
- pysmarthashtag-0.9.1/.devcontainer.json +27 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.github/copilot-instructions.md +4 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.github/workflows/python-package.yml +2 -1
- {pysmarthashtag-0.8.2/pySmartHashtag.egg-info → pysmarthashtag-0.9.1}/PKG-INFO +3 -3
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/README.md +1 -1
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1/pySmartHashtag.egg-info}/PKG-INFO +3 -3
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pySmartHashtag.egg-info/SOURCES.txt +2 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pyproject.toml +1 -1
- pysmarthashtag-0.9.1/pysmarthashtag/__init__.py +8 -0
- pysmarthashtag-0.9.1/pysmarthashtag/api/authentication.py +675 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/const.py +24 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/__init__.py +7 -2
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/common.py +20 -2
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/auth_context.url +1 -1
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/auth_intermediate.url +1 -1
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/auth_result.url +1 -1
- pysmarthashtag-0.9.1/pysmarthashtag/tests/test_authentication_backoff.py +193 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_dc_charging.py +2 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/requirements-test.txt +1 -1
- pysmarthashtag-0.8.2/pysmarthashtag/__init__.py +0 -5
- pysmarthashtag-0.8.2/pysmarthashtag/api/authentication.py +0 -399
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.github/dependabot.yml +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.github/workflows/python-publish.yml +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.gitignore +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.pre-commit-config.yaml +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.vscode/launch.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.vscode/settings.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/AUTHORS +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/CODE_OF_CONDUCT.md +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/CONTRIBUTING.md +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/ChangeLog +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/LICENSE +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pySmartHashtag.egg-info/dependency_links.txt +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pySmartHashtag.egg-info/requires.txt +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pySmartHashtag.egg-info/top_level.txt +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/account.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/__init__.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/client.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/log_sanitizer.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/ssl_context.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/utils.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/cli.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/control/charging.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/control/climate.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/models.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/conftest.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/Human_and_vehicle_relationship_does_not_exist.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/api_access.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/charging_success.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/climate_success.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/login_result.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/ota_response.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/soc_80.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/soc_90.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/token_expired.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_info.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_info2.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_info_dc_charging.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_response.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_result.json +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_account.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_actions.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_charging.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_endpoint_urls.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_log_sanitizer.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_missing_fields.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_ssl_context.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/__init__.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/battery.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/climate.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/maintenance.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/position.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/running.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/safety.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/tires.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/vehicle.py +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/requirements-cli.txt +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/requirements.txt +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/run.sh +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/setup.cfg +0 -0
- {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/setup.py +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pySmartHashtag",
|
|
3
|
+
"image": "mcr.microsoft.com/devcontainers/python:dev-3.14-bookworm",
|
|
4
|
+
"postCreateCommand": "pip install -r requirements.txt && pip install -r requirements-test.txt && pip install -e .",
|
|
5
|
+
"customizations": {
|
|
6
|
+
"vscode": {
|
|
7
|
+
"extensions": [
|
|
8
|
+
"ms-python.python",
|
|
9
|
+
"charliermarsh.ruff",
|
|
10
|
+
"github.vscode-pull-request-github",
|
|
11
|
+
"ryanluker.vscode-coverage-gutters",
|
|
12
|
+
"ms-python.vscode-pylance"
|
|
13
|
+
],
|
|
14
|
+
"settings": {
|
|
15
|
+
"files.eol": "\n",
|
|
16
|
+
"editor.tabSize": 4,
|
|
17
|
+
"python.analysis.autoSearchPaths": false,
|
|
18
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
19
|
+
"editor.formatOnPaste": false,
|
|
20
|
+
"editor.formatOnSave": true,
|
|
21
|
+
"editor.formatOnType": true,
|
|
22
|
+
"files.trimTrailingWhitespace": true
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"remoteUser": "vscode"
|
|
27
|
+
}
|
|
@@ -61,6 +61,7 @@ pre-commit run --all-files
|
|
|
61
61
|
### Ruff Configuration
|
|
62
62
|
|
|
63
63
|
The project uses ruff with the following rule sets:
|
|
64
|
+
|
|
64
65
|
- C (complexity)
|
|
65
66
|
- D (docstrings)
|
|
66
67
|
- E (pycodestyle)
|
|
@@ -116,6 +117,7 @@ async def example_method(self) -> dict:
|
|
|
116
117
|
## Error Handling
|
|
117
118
|
|
|
118
119
|
Use the custom exception classes defined in `models.py`:
|
|
120
|
+
|
|
119
121
|
- `SmartAuthError` - Authentication failures
|
|
120
122
|
- `SmartTokenRefreshNecessary` - Token refresh required
|
|
121
123
|
- `SmartHumanCarConnectionError` - Human-car connection issues
|
|
@@ -136,11 +138,13 @@ Use `sanitize_log_data()` from `api.log_sanitizer` when logging sensitive data.
|
|
|
136
138
|
## Dependencies
|
|
137
139
|
|
|
138
140
|
Main dependencies:
|
|
141
|
+
|
|
139
142
|
- `httpx` - Async HTTP client
|
|
140
143
|
- `pycryptodome` - Cryptographic functions
|
|
141
144
|
- `pyjwt` - JWT token handling
|
|
142
145
|
|
|
143
146
|
Test dependencies:
|
|
147
|
+
|
|
144
148
|
- `pytest`, `pytest-asyncio`, `pytest-cov`
|
|
145
149
|
- `respx` - HTTP mocking
|
|
146
150
|
- `ruff` - Linting and formatting
|
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
strategy:
|
|
21
21
|
fail-fast: false
|
|
22
22
|
matrix:
|
|
23
|
-
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
|
23
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
24
24
|
|
|
25
25
|
steps:
|
|
26
26
|
- uses: actions/checkout@v4.1.1
|
|
@@ -47,6 +47,7 @@ jobs:
|
|
|
47
47
|
pytest --cov=pysmarthashtag --cov-report=xml --cov-report=term-missing --cov-fail-under=80 pysmarthashtag/tests/
|
|
48
48
|
- name: Pytest coverage comment
|
|
49
49
|
id: coverageComment
|
|
50
|
+
if: github.event_name != 'pull_request'
|
|
50
51
|
uses: MishaKav/pytest-coverage-comment@main
|
|
51
52
|
with:
|
|
52
53
|
pytest-xml-coverage-path: ./coverage.xml
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pySmartHashtag
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: A python library to get information from Smart #1 and #
|
|
3
|
+
Version: 0.9.1
|
|
4
|
+
Summary: A python library to get information from Smart #1, #3 and #5 web API
|
|
5
5
|
Home-page: https://github.com/dasBasti/pySmartHashtag
|
|
6
6
|
Author: dasBasti
|
|
7
7
|
Author-email: Bastian Neumann <neumann.bastian@gmail.com>
|
|
@@ -52,7 +52,7 @@ Dynamic: license-file
|
|
|
52
52
|
[![CodeQL Validation][codeql-shield]][codeql]
|
|
53
53
|
[![Dependency Validation][tests-shield]][tests]
|
|
54
54
|
|
|
55
|
-
API wrapper for Smart #1 and #
|
|
55
|
+
API wrapper for Smart #1, #3 and #5 Cloud Service
|
|
56
56
|
|
|
57
57
|
Regard this to be kind of stable. This library is used in custom [Homeassistant](https://homeassistant.io) component [Smart Hashtag](https://github.com/DasBasti/SmartHashtag)
|
|
58
58
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[![CodeQL Validation][codeql-shield]][codeql]
|
|
6
6
|
[![Dependency Validation][tests-shield]][tests]
|
|
7
7
|
|
|
8
|
-
API wrapper for Smart #1 and #
|
|
8
|
+
API wrapper for Smart #1, #3 and #5 Cloud Service
|
|
9
9
|
|
|
10
10
|
Regard this to be kind of stable. This library is used in custom [Homeassistant](https://homeassistant.io) component [Smart Hashtag](https://github.com/DasBasti/SmartHashtag)
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pySmartHashtag
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: A python library to get information from Smart #1 and #
|
|
3
|
+
Version: 0.9.1
|
|
4
|
+
Summary: A python library to get information from Smart #1, #3 and #5 web API
|
|
5
5
|
Home-page: https://github.com/dasBasti/pySmartHashtag
|
|
6
6
|
Author: dasBasti
|
|
7
7
|
Author-email: Bastian Neumann <neumann.bastian@gmail.com>
|
|
@@ -52,7 +52,7 @@ Dynamic: license-file
|
|
|
52
52
|
[![CodeQL Validation][codeql-shield]][codeql]
|
|
53
53
|
[![Dependency Validation][tests-shield]][tests]
|
|
54
54
|
|
|
55
|
-
API wrapper for Smart #1 and #
|
|
55
|
+
API wrapper for Smart #1, #3 and #5 Cloud Service
|
|
56
56
|
|
|
57
57
|
Regard this to be kind of stable. This library is used in custom [Homeassistant](https://homeassistant.io) component [Smart Hashtag](https://github.com/DasBasti/SmartHashtag)
|
|
58
58
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
.devcontainer.json
|
|
1
2
|
.gitignore
|
|
2
3
|
.pre-commit-config.yaml
|
|
3
4
|
AUTHORS
|
|
@@ -42,6 +43,7 @@ pysmarthashtag/tests/common.py
|
|
|
42
43
|
pysmarthashtag/tests/conftest.py
|
|
43
44
|
pysmarthashtag/tests/test_account.py
|
|
44
45
|
pysmarthashtag/tests/test_actions.py
|
|
46
|
+
pysmarthashtag/tests/test_authentication_backoff.py
|
|
45
47
|
pysmarthashtag/tests/test_charging.py
|
|
46
48
|
pysmarthashtag/tests/test_dc_charging.py
|
|
47
49
|
pysmarthashtag/tests/test_endpoint_urls.py
|
|
@@ -8,7 +8,7 @@ dynamic = ["version"]
|
|
|
8
8
|
authors = [
|
|
9
9
|
{"name" = "Bastian Neumann", "email" = "neumann.bastian@gmail.com"},
|
|
10
10
|
]
|
|
11
|
-
description = "A python library to get information from Smart #1 and #
|
|
11
|
+
description = "A python library to get information from Smart #1, #3 and #5 web API"
|
|
12
12
|
license = {file = "LICENSE"}
|
|
13
13
|
readme = "README.md"
|
|
14
14
|
requires-python = ">=3.9"
|