eero-api 4.2.0__tar.gz → 4.3.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.
Files changed (49) hide show
  1. {eero_api-4.2.0/src/eero_api.egg-info → eero_api-4.3.0}/PKG-INFO +2 -5
  2. {eero_api-4.2.0 → eero_api-4.3.0}/README.md +1 -4
  3. {eero_api-4.2.0 → eero_api-4.3.0}/pyproject.toml +2 -2
  4. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/__init__.py +1 -1
  5. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/base.py +14 -3
  6. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/const.py +3 -0
  7. {eero_api-4.2.0 → eero_api-4.3.0/src/eero_api.egg-info}/PKG-INFO +2 -5
  8. {eero_api-4.2.0 → eero_api-4.3.0}/LICENSE +0 -0
  9. {eero_api-4.2.0 → eero_api-4.3.0}/setup.cfg +0 -0
  10. {eero_api-4.2.0 → eero_api-4.3.0}/setup.py +0 -0
  11. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/__main__.py +0 -0
  12. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/__init__.py +0 -0
  13. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/ac_compat.py +0 -0
  14. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/activity.py +0 -0
  15. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/auth.py +0 -0
  16. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/auth_storage.py +0 -0
  17. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/backup.py +0 -0
  18. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/blacklist.py +0 -0
  19. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/burst_reporters.py +0 -0
  20. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/data_usage.py +0 -0
  21. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/devices.py +0 -0
  22. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/diagnostics.py +0 -0
  23. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/dns.py +0 -0
  24. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/eeros.py +0 -0
  25. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/forwards.py +0 -0
  26. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/insights.py +0 -0
  27. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/networks.py +0 -0
  28. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/ouicheck.py +0 -0
  29. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/password.py +0 -0
  30. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/profiles.py +0 -0
  31. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/reservations.py +0 -0
  32. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/routing.py +0 -0
  33. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/schedule.py +0 -0
  34. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/security.py +0 -0
  35. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/settings.py +0 -0
  36. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/sqm.py +0 -0
  37. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/support.py +0 -0
  38. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/thread.py +0 -0
  39. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/transfer.py +0 -0
  40. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/api/updates.py +0 -0
  41. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/client.py +0 -0
  42. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/exceptions.py +0 -0
  43. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/logging.py +0 -0
  44. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero/py.typed +0 -0
  45. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero_api.egg-info/SOURCES.txt +0 -0
  46. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero_api.egg-info/dependency_links.txt +0 -0
  47. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero_api.egg-info/requires.txt +0 -0
  48. {eero_api-4.2.0 → eero_api-4.3.0}/src/eero_api.egg-info/top_level.txt +0 -0
  49. {eero_api-4.2.0 → eero_api-4.3.0}/tests/test_logging.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eero-api
3
- Version: 4.2.0
3
+ Version: 4.3.0
4
4
  Summary: Modern async Python client for Eero network management
5
5
  Author: Eero API Contributors
6
6
  Maintainer: Eero API Contributors
@@ -120,8 +120,6 @@ All API methods return the exact JSON from Eero's API:
120
120
  }
121
121
  ```
122
122
 
123
- See [MIGRATION.md](MIGRATION.md) for details on the raw response architecture.
124
-
125
123
  ## 📚 Docs
126
124
 
127
125
  | Guide | What's inside |
@@ -129,14 +127,13 @@ See [MIGRATION.md](MIGRATION.md) for details on the raw response architecture.
129
127
  | **[📖 Python API](../../wiki/Python-API)** | Full API reference |
130
128
  | **[⚙️ Configuration](../../wiki/Configuration)** | Auth & settings |
131
129
  | **[🔧 Troubleshooting](../../wiki/Troubleshooting)** | Common fixes |
132
- | **[🔄 Migration Guide](MIGRATION.md)** | v1.x → v2.0 migration |
133
130
  | **[🏠 Wiki Home](../../wiki)** | All documentation |
134
131
 
135
132
  ## 🔗 Ecosystem
136
133
 
137
134
  | Project | Description |
138
135
  |---------|-------------|
139
- | **[🖥️ eero-cli](https://github.com/fulviofreitas/eero-cli)** | Terminal interface for Eero networks |
136
+ | **[🖥️ eeroctl](https://github.com/fulviofreitas/eeroctl)** | Terminal interface for Eero networks |
140
137
  | **[🛜 eero-ui](https://github.com/fulviofreitas/eero-ui)** | Svelte dashboard for network management |
141
138
  | **[📊 eero-prometheus-exporter](https://github.com/fulviofreitas/eero-prometheus-exporter)** | Prometheus metrics for monitoring |
142
139
 
@@ -72,8 +72,6 @@ All API methods return the exact JSON from Eero's API:
72
72
  }
73
73
  ```
74
74
 
75
- See [MIGRATION.md](MIGRATION.md) for details on the raw response architecture.
76
-
77
75
  ## 📚 Docs
78
76
 
79
77
  | Guide | What's inside |
@@ -81,14 +79,13 @@ See [MIGRATION.md](MIGRATION.md) for details on the raw response architecture.
81
79
  | **[📖 Python API](../../wiki/Python-API)** | Full API reference |
82
80
  | **[⚙️ Configuration](../../wiki/Configuration)** | Auth & settings |
83
81
  | **[🔧 Troubleshooting](../../wiki/Troubleshooting)** | Common fixes |
84
- | **[🔄 Migration Guide](MIGRATION.md)** | v1.x → v2.0 migration |
85
82
  | **[🏠 Wiki Home](../../wiki)** | All documentation |
86
83
 
87
84
  ## 🔗 Ecosystem
88
85
 
89
86
  | Project | Description |
90
87
  |---------|-------------|
91
- | **[🖥️ eero-cli](https://github.com/fulviofreitas/eero-cli)** | Terminal interface for Eero networks |
88
+ | **[🖥️ eeroctl](https://github.com/fulviofreitas/eeroctl)** | Terminal interface for Eero networks |
92
89
  | **[🛜 eero-ui](https://github.com/fulviofreitas/eero-ui)** | Svelte dashboard for network management |
93
90
  | **[📊 eero-prometheus-exporter](https://github.com/fulviofreitas/eero-prometheus-exporter)** | Prometheus metrics for monitoring |
94
91
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "eero-api"
7
- version = "4.2.0"
7
+ version = "4.3.0"
8
8
  description = "Modern async Python client for Eero network management"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -121,7 +121,7 @@ asyncio_mode = "auto"
121
121
 
122
122
  [tool.commitizen]
123
123
  name = "cz_conventional_commits"
124
- version = "4.2.0"
124
+ version = "4.3.0"
125
125
  version_files = [
126
126
  "pyproject.toml:project.version",
127
127
  "src/eero/__init__.py:__version__",
@@ -27,4 +27,4 @@ __all__ = [
27
27
  "redact_sensitive",
28
28
  ]
29
29
 
30
- __version__ = "4.2.0"
30
+ __version__ = "4.3.0"
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import asyncio
6
+ import json
6
7
  import logging
7
8
  from typing import TYPE_CHECKING, Any, Dict, Optional
8
9
 
@@ -12,7 +13,7 @@ from aiohttp import ClientSession
12
13
  if TYPE_CHECKING:
13
14
  from .auth import AuthAPI
14
15
 
15
- from ..const import DEFAULT_HEADERS
16
+ from ..const import DEFAULT_HEADERS, MAX_RESPONSE_BYTES
16
17
  from ..exceptions import (
17
18
  EeroAPIException,
18
19
  EeroAuthenticationException,
@@ -119,16 +120,26 @@ class BaseAPI:
119
120
 
120
121
  try:
121
122
  async with self.session.request(method, url, **kwargs) as response:
122
- response_text = await response.text()
123
123
  _LOGGER.debug("Response status: %s", response.status)
124
124
 
125
+ # Read at most MAX_RESPONSE_BYTES + 1 bytes so that exceeding
126
+ # the limit is detectable without buffering an unbounded body.
127
+ raw_bytes = await response.content.read(MAX_RESPONSE_BYTES + 1)
128
+ if len(raw_bytes) > MAX_RESPONSE_BYTES:
129
+ raise EeroAPIException(
130
+ response.status,
131
+ f"Response body exceeded max size of {MAX_RESPONSE_BYTES} bytes",
132
+ )
133
+
134
+ response_text = raw_bytes.decode("utf-8")
135
+
125
136
  # All 2xx status codes are success responses
126
137
  if 200 <= response.status < 300:
127
138
  # 204 No Content has no body
128
139
  if response.status == 204 or not response_text.strip():
129
140
  return {}
130
141
  try:
131
- return await response.json()
142
+ return json.loads(response_text)
132
143
  except Exception as e:
133
144
  _LOGGER.error("Error parsing JSON response: %s", e)
134
145
  raise EeroAPIException(
@@ -19,6 +19,9 @@ DEFAULT_HEADERS: Final[Dict[str, str]] = {
19
19
  # Cache timeouts (in seconds)
20
20
  CACHE_TIMEOUT: Final[int] = 60 # Default cache timeout
21
21
 
22
+ # Response body size limit — guards against unbounded memory consumption
23
+ MAX_RESPONSE_BYTES: Final[int] = 10 * 1024 * 1024 # 10 MiB
24
+
22
25
  # Session keys
23
26
  SESSION_TOKEN_KEY: Final[str] = "session_token"
24
27
  REFRESH_TOKEN_KEY: Final[str] = "refresh_token"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eero-api
3
- Version: 4.2.0
3
+ Version: 4.3.0
4
4
  Summary: Modern async Python client for Eero network management
5
5
  Author: Eero API Contributors
6
6
  Maintainer: Eero API Contributors
@@ -120,8 +120,6 @@ All API methods return the exact JSON from Eero's API:
120
120
  }
121
121
  ```
122
122
 
123
- See [MIGRATION.md](MIGRATION.md) for details on the raw response architecture.
124
-
125
123
  ## 📚 Docs
126
124
 
127
125
  | Guide | What's inside |
@@ -129,14 +127,13 @@ See [MIGRATION.md](MIGRATION.md) for details on the raw response architecture.
129
127
  | **[📖 Python API](../../wiki/Python-API)** | Full API reference |
130
128
  | **[⚙️ Configuration](../../wiki/Configuration)** | Auth & settings |
131
129
  | **[🔧 Troubleshooting](../../wiki/Troubleshooting)** | Common fixes |
132
- | **[🔄 Migration Guide](MIGRATION.md)** | v1.x → v2.0 migration |
133
130
  | **[🏠 Wiki Home](../../wiki)** | All documentation |
134
131
 
135
132
  ## 🔗 Ecosystem
136
133
 
137
134
  | Project | Description |
138
135
  |---------|-------------|
139
- | **[🖥️ eero-cli](https://github.com/fulviofreitas/eero-cli)** | Terminal interface for Eero networks |
136
+ | **[🖥️ eeroctl](https://github.com/fulviofreitas/eeroctl)** | Terminal interface for Eero networks |
140
137
  | **[🛜 eero-ui](https://github.com/fulviofreitas/eero-ui)** | Svelte dashboard for network management |
141
138
  | **[📊 eero-prometheus-exporter](https://github.com/fulviofreitas/eero-prometheus-exporter)** | Prometheus metrics for monitoring |
142
139
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes