aioamazondevices 8.0.0__tar.gz → 8.0.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 (18) hide show
  1. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/PKG-INFO +1 -1
  2. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/pyproject.toml +1 -1
  3. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/__init__.py +1 -1
  4. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/api.py +1 -29
  5. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/utils.py +23 -1
  6. aioamazondevices-8.0.0/src/aioamazondevices/const/common.py +0 -26
  7. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/LICENSE +0 -0
  8. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/README.md +0 -0
  9. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/const/__init__.py +0 -0
  10. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/const/devices.py +0 -0
  11. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/const/http.py +0 -0
  12. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/const/metadata.py +0 -0
  13. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/const/queries.py +0 -0
  14. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/const/schedules.py +0 -0
  15. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/const/sounds.py +0 -0
  16. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/exceptions.py +0 -0
  17. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/py.typed +0 -0
  18. {aioamazondevices-8.0.0 → aioamazondevices-8.0.1}/src/aioamazondevices/structures.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioamazondevices
3
- Version: 8.0.0
3
+ Version: 8.0.1
4
4
  Summary: Python library to control Amazon devices
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "aioamazondevices"
3
- version = "8.0.0"
3
+ version = "8.0.1"
4
4
  requires-python = ">=3.12"
5
5
  description = "Python library to control Amazon devices"
6
6
  authors = [
@@ -1,6 +1,6 @@
1
1
  """aioamazondevices library."""
2
2
 
3
- __version__ = "8.0.0"
3
+ __version__ = "8.0.1"
4
4
 
5
5
 
6
6
  from .api import AmazonDevice, AmazonEchoApi
@@ -27,7 +27,6 @@ from multidict import MultiDictProxy
27
27
  from yarl import URL
28
28
 
29
29
  from . import __version__
30
- from .const.common import _LOGGER
31
30
  from .const.devices import (
32
31
  DEVICE_TO_IGNORE,
33
32
  DEVICE_TYPE_TO_MODEL,
@@ -82,7 +81,7 @@ from .structures import (
82
81
  AmazonSchedule,
83
82
  AmazonSequenceType,
84
83
  )
85
- from .utils import obfuscate_email, scrub_fields
84
+ from .utils import _LOGGER, obfuscate_email, scrub_fields
86
85
 
87
86
 
88
87
  class AmazonEchoApi:
@@ -951,10 +950,6 @@ class AmazonEchoApi:
951
950
  obfuscate_email(self._login_email),
952
951
  )
953
952
 
954
- # Check if session is still authenticated
955
- if not await self.auth_check_status():
956
- raise CannotAuthenticate("Session no longer authenticated")
957
-
958
953
  return self._login_stored_data
959
954
 
960
955
  async def _get_alexa_domain(self) -> str:
@@ -1177,29 +1172,6 @@ class AmazonEchoApi:
1177
1172
 
1178
1173
  self._final_devices = final_devices_list
1179
1174
 
1180
- async def auth_check_status(self) -> bool:
1181
- """Check AUTH status."""
1182
- _, raw_resp = await self._session_request(
1183
- method=HTTPMethod.GET,
1184
- url=f"https://alexa.amazon.{self._domain}/api/bootstrap?version=0",
1185
- agent="Browser",
1186
- )
1187
- if raw_resp.status != HTTPStatus.OK:
1188
- _LOGGER.debug(
1189
- "Session not authenticated: reply error %s",
1190
- raw_resp.status,
1191
- )
1192
- return False
1193
-
1194
- resp_json = await self._response_to_json(raw_resp)
1195
- if not (authentication := resp_json.get("authentication")):
1196
- _LOGGER.debug('Session not authenticated: reply missing "authentication"')
1197
- return False
1198
-
1199
- authenticated = authentication.get("authenticated")
1200
- _LOGGER.debug("Session authenticated: %s", authenticated)
1201
- return bool(authenticated)
1202
-
1203
1175
  def get_model_details(self, device: AmazonDevice) -> dict[str, str | None] | None:
1204
1176
  """Return model datails."""
1205
1177
  model_details: dict[str, str | None] | None = DEVICE_TYPE_TO_MODEL.get(
@@ -1,9 +1,31 @@
1
1
  """Utils module for Amazon devices."""
2
2
 
3
+ import logging
3
4
  from collections.abc import Collection
4
5
  from typing import Any
5
6
 
6
- from .const.common import TO_REDACT
7
+ _LOGGER = logging.getLogger(__package__)
8
+
9
+ TO_REDACT = {
10
+ "address",
11
+ "address1",
12
+ "address2",
13
+ "address3",
14
+ "city",
15
+ "county",
16
+ "customerId",
17
+ "deviceAccountId",
18
+ "deviceAddress",
19
+ "deviceOwnerCustomerId",
20
+ "given_name",
21
+ "name",
22
+ "password",
23
+ "postalCode",
24
+ "searchCustomerId",
25
+ "state",
26
+ "street",
27
+ "user_id",
28
+ }
7
29
 
8
30
 
9
31
  def obfuscate_email(email: str) -> str:
@@ -1,26 +0,0 @@
1
- """aioamazondevices Common const."""
2
-
3
- import logging
4
-
5
- _LOGGER = logging.getLogger(__package__)
6
-
7
- TO_REDACT = {
8
- "address",
9
- "address1",
10
- "address2",
11
- "address3",
12
- "city",
13
- "county",
14
- "customerId",
15
- "deviceAccountId",
16
- "deviceAddress",
17
- "deviceOwnerCustomerId",
18
- "given_name",
19
- "name",
20
- "password",
21
- "postalCode",
22
- "searchCustomerId",
23
- "state",
24
- "street",
25
- "user_id",
26
- }