python-airselangor 0.1.0__tar.gz → 0.1.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. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/PKG-INFO +1 -1
  2. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/pyproject.toml +1 -1
  3. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/airselangor/__init__.py +1 -1
  4. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/airselangor/client.py +2 -10
  5. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/airselangor/exceptions.py +1 -1
  6. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/python_airselangor.egg-info/PKG-INFO +1 -1
  7. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/README.md +0 -0
  8. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/setup.cfg +0 -0
  9. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/airselangor/__main__.py +0 -0
  10. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/airselangor/cli.py +0 -0
  11. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/airselangor/models.py +0 -0
  12. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/airselangor/retry.py +0 -0
  13. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/python_airselangor.egg-info/SOURCES.txt +0 -0
  14. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/python_airselangor.egg-info/dependency_links.txt +0 -0
  15. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/python_airselangor.egg-info/entry_points.txt +0 -0
  16. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/python_airselangor.egg-info/requires.txt +0 -0
  17. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/src/python_airselangor.egg-info/top_level.txt +0 -0
  18. {python_airselangor-0.1.0 → python_airselangor-0.1.1}/tests/test_client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-airselangor
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Asynchronous Python client for Air Selangor customer portal API
5
5
  Author: Zubir Jamal
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-airselangor"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Asynchronous Python client for Air Selangor customer portal API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -11,7 +11,7 @@ from .exceptions import (
11
11
  )
12
12
  from .models import AccountData, Bill, Payment, WaterAccount
13
13
 
14
- __version__ = "0.1.0"
14
+ __version__ = "0.1.1"
15
15
 
16
16
  __all__ = [
17
17
  "AccountData",
@@ -1,12 +1,4 @@
1
- """Async client for the Air Selangor customer API (api3.airselangor.com).
2
-
3
- Reverse-engineered from the www.airselangor.com Next.js portal:
4
- * Every request is a JSON POST to ``https://api3.airselangor.com/<path>``.
5
- * Unauthenticated calls carry a "public token":
6
- ``Authorization: Bearer sha256("airselangorsecretkey" + Timestamp)``.
7
- * Authenticated calls carry ``Authorization: Bearer <accesstoken>``.
8
- * Responses are wrapped: ``{"status": bool, "message": str, "error": {...}, "data": {...}}``.
9
- """
1
+ """Async client for the Air Selangor customer portal API."""
10
2
 
11
3
  from __future__ import annotations
12
4
 
@@ -154,7 +146,7 @@ class AirSelangorClient:
154
146
  raw_text = await resp.text()
155
147
  if "Access denied" in raw_text or "Cloudflare" in raw_text or "WAF" in raw_text:
156
148
  raise GeoBlockedError()
157
- raise AirSelangorAuthError(f"{path}: HTTP 403 Forbidden")
149
+ raise AirSelangorApiError(f"{path}: HTTP 403 Forbidden")
158
150
 
159
151
  if status == 429:
160
152
  raise AirSelangorRateLimitError(f"{path}: HTTP 429 Too Many Requests")
@@ -37,7 +37,7 @@ class AirSelangorRateLimitError(AirSelangorError):
37
37
  """Raised when API returns rate limit or too many requests (429)."""
38
38
 
39
39
 
40
- class GeoBlockedError(AirSelangorAuthError):
40
+ class GeoBlockedError(AirSelangorError):
41
41
  """Raised when request is blocked due to geographic/VPN restrictions.
42
42
 
43
43
  Malaysian utility APIs frequently block non-Malaysian IP addresses and VPNs.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-airselangor
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Asynchronous Python client for Air Selangor customer portal API
5
5
  Author: Zubir Jamal
6
6
  License: MIT