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.
Files changed (81) hide show
  1. pysmarthashtag-0.9.1/.devcontainer.json +27 -0
  2. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.github/copilot-instructions.md +4 -0
  3. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.github/workflows/python-package.yml +2 -1
  4. {pysmarthashtag-0.8.2/pySmartHashtag.egg-info → pysmarthashtag-0.9.1}/PKG-INFO +3 -3
  5. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/README.md +1 -1
  6. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1/pySmartHashtag.egg-info}/PKG-INFO +3 -3
  7. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pySmartHashtag.egg-info/SOURCES.txt +2 -0
  8. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pyproject.toml +1 -1
  9. pysmarthashtag-0.9.1/pysmarthashtag/__init__.py +8 -0
  10. pysmarthashtag-0.9.1/pysmarthashtag/api/authentication.py +675 -0
  11. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/const.py +24 -0
  12. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/__init__.py +7 -2
  13. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/common.py +20 -2
  14. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/auth_context.url +1 -1
  15. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/auth_intermediate.url +1 -1
  16. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/auth_result.url +1 -1
  17. pysmarthashtag-0.9.1/pysmarthashtag/tests/test_authentication_backoff.py +193 -0
  18. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_dc_charging.py +2 -0
  19. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/requirements-test.txt +1 -1
  20. pysmarthashtag-0.8.2/pysmarthashtag/__init__.py +0 -5
  21. pysmarthashtag-0.8.2/pysmarthashtag/api/authentication.py +0 -399
  22. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.github/dependabot.yml +0 -0
  23. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.github/workflows/python-publish.yml +0 -0
  24. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.gitignore +0 -0
  25. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.pre-commit-config.yaml +0 -0
  26. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.vscode/launch.json +0 -0
  27. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/.vscode/settings.json +0 -0
  28. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/AUTHORS +0 -0
  29. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/CODE_OF_CONDUCT.md +0 -0
  30. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/CONTRIBUTING.md +0 -0
  31. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/ChangeLog +0 -0
  32. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/LICENSE +0 -0
  33. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pySmartHashtag.egg-info/dependency_links.txt +0 -0
  34. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pySmartHashtag.egg-info/requires.txt +0 -0
  35. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pySmartHashtag.egg-info/top_level.txt +0 -0
  36. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/account.py +0 -0
  37. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/__init__.py +0 -0
  38. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/client.py +0 -0
  39. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/log_sanitizer.py +0 -0
  40. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/ssl_context.py +0 -0
  41. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/api/utils.py +0 -0
  42. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/cli.py +0 -0
  43. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/control/charging.py +0 -0
  44. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/control/climate.py +0 -0
  45. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/models.py +0 -0
  46. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/conftest.py +0 -0
  47. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/Human_and_vehicle_relationship_does_not_exist.json +0 -0
  48. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/api_access.json +0 -0
  49. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/charging_success.json +0 -0
  50. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/climate_success.json +0 -0
  51. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/login_result.json +0 -0
  52. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/ota_response.json +0 -0
  53. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/soc_80.json +0 -0
  54. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/soc_90.json +0 -0
  55. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/token_expired.json +0 -0
  56. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_info.json +0 -0
  57. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_info2.json +0 -0
  58. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_info_dc_charging.json +0 -0
  59. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_response.json +0 -0
  60. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/replys/vehicle_result.json +0 -0
  61. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_account.py +0 -0
  62. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_actions.py +0 -0
  63. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_charging.py +0 -0
  64. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_endpoint_urls.py +0 -0
  65. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_log_sanitizer.py +0 -0
  66. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_missing_fields.py +0 -0
  67. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/tests/test_ssl_context.py +0 -0
  68. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/__init__.py +0 -0
  69. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/battery.py +0 -0
  70. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/climate.py +0 -0
  71. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/maintenance.py +0 -0
  72. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/position.py +0 -0
  73. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/running.py +0 -0
  74. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/safety.py +0 -0
  75. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/tires.py +0 -0
  76. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/pysmarthashtag/vehicle/vehicle.py +0 -0
  77. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/requirements-cli.txt +0 -0
  78. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/requirements.txt +0 -0
  79. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/run.sh +0 -0
  80. {pysmarthashtag-0.8.2 → pysmarthashtag-0.9.1}/setup.cfg +0 -0
  81. {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.8.2
4
- Summary: A python library to get information from Smart #1 and #3 web API
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 #3 Cloud Service
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 #3 Cloud Service
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.8.2
4
- Summary: A python library to get information from Smart #1 and #3 web API
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 #3 Cloud Service
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 #3 web API"
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"
@@ -0,0 +1,8 @@
1
+ """Library to read data from the Smart API."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ try:
6
+ __version__ = version("pySmartHashtag")
7
+ except PackageNotFoundError:
8
+ __version__ = "0.0.0"