parseapi 1.9.2__py3-none-any.whl → 1.9.3__py3-none-any.whl

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.
parseapi/__init__.py CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  from ._client import AsyncParseAPI, ParseAPI, ParseAPIError
4
4
 
5
- __version__ = "1.9.2"
5
+ __version__ = "1.9.3"
6
6
  __all__ = ["ParseAPI", "AsyncParseAPI", "ParseAPIError", "__version__"]
parseapi/_client.py CHANGED
@@ -12,7 +12,7 @@ from urllib.parse import quote
12
12
 
13
13
  import httpx
14
14
 
15
- VERSION = "1.9.0"
15
+ VERSION = "1.9.3"
16
16
  _API_VERSION = "2.0.0"
17
17
  DEFAULT_BASE_URL = "https://api.parseapi.com"
18
18
  DEFAULT_TIMEOUT = 10.0
@@ -591,9 +591,13 @@ class _IndustrySync:
591
591
  return self._client._get("/industry", {"q": query, "limit": limit, "deep": deep})
592
592
 
593
593
 
594
+ def _tariff_edition_id(value: Any) -> bool:
595
+ return isinstance(value, str) and (re.fullmatch(r"[a-f0-9]{64}", value) is not None or (re.fullmatch(r"ted_[1-9][0-9]{0,19}", value) is not None and (len(value) < 24 or value[4:] <= "18446744073709551615")))
596
+
597
+
594
598
  def _tariff_selection(result: Json, edition: Optional[str], date: Optional[str]) -> Json:
595
599
  if (edition is not None or date is not None) and (
596
- not isinstance(result.get("edition"), str) or re.fullmatch(r"[a-f0-9]{64}", result["edition"]) is None
600
+ not _tariff_edition_id(result.get("edition"))
597
601
  or (edition is not None and result.get("edition") != edition)
598
602
  or (result.get("date") != date)
599
603
  ):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: parseapi
3
- Version: 1.9.2
3
+ Version: 1.9.3
4
4
  Summary: Official ParseAPI client for Python. One key, minimal JSON, fast.
5
5
  Project-URL: Homepage, https://parseapi.com
6
6
  Project-URL: Documentation, https://parseapi.com/docs
@@ -289,7 +289,7 @@ parse.weather(40.7128, -74.006, deep=True, date="2026-08-15")
289
289
 
290
290
  Tariff starts with the general schedule line. Paid deep adds units and the special and other schedule columns. An optional origin then resolves country-specific measures. The three calls below show those successive choices. Without origin, schedule detail is still returned and origin-dependent fields are null. A null effective rate is not a zero rate.
291
291
 
292
- Tariff lookup and search accept an optional `edition` fingerprint and `date` (`YYYY-MM-DD`). The edition pins exact immutable source bytes. A date is accepted only when verified source coverage exists. An edition without a date returns undated schedule context (`date: null`). Default requests use today. Paid detail exposes an open-string `reason` when `effective_rate` is null, including `incomplete_coverage`. A null rate never means zero. Explicit selections fail with `tariff_selection_mismatch` if an older server ignores the requested scope.
292
+ Tariff lookup and search accept the `edition` ID returned by Tariff, such as `ted_3`, and an optional `date` (`YYYY-MM-DD`). The edition pins exact immutable source bytes. A date is accepted only when verified source coverage exists. An edition without a date returns undated schedule context (`date: null`). Default requests use today. Paid detail exposes an open-string `reason` when `effective_rate` is null, including `incomplete_coverage`. A null rate never means zero. Explicit selections fail with `tariff_selection_mismatch` if an older server ignores the requested scope.
293
293
 
294
294
  Origin means where the goods originate, not where they ship from. The effective rate covers matched stored schedule measures only. It is not complete duty or landed cost.
295
295
 
@@ -0,0 +1,7 @@
1
+ parseapi/__init__.py,sha256=RL_yqjNy3f7ROQBjNWrlgVHEfCQnOskCbITQ_Uevuj0,199
2
+ parseapi/_client.py,sha256=ll1Tj5bvUrZ3-iflbCJ8dR-p-WfZ4mG85cYVc6Y0IlE,68246
3
+ parseapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ parseapi-1.9.3.dist-info/METADATA,sha256=T5bKb6yafGtASLXcNs34qI36UXg2g8GhK8G_vNSd7pc,35085
5
+ parseapi-1.9.3.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
6
+ parseapi-1.9.3.dist-info/licenses/LICENSE,sha256=3IF5YNQQ6vF8sAs9hGRcovgEetJuzSwKqoE1TXLMoRs,1065
7
+ parseapi-1.9.3.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- parseapi/__init__.py,sha256=vf1RGU8PGK_XYLrSbWes-eHH3K2PsVNjVNGO3uONoLI,199
2
- parseapi/_client.py,sha256=S9avf2-WW0SZUtDkoHTnnG1T9vJoU_iMyObXeqXBVlU,68045
3
- parseapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- parseapi-1.9.2.dist-info/METADATA,sha256=OaD_WXvvGH_4lBPfPDD693yumdZJtIDjPPCUgHqfthE,35053
5
- parseapi-1.9.2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
6
- parseapi-1.9.2.dist-info/licenses/LICENSE,sha256=3IF5YNQQ6vF8sAs9hGRcovgEetJuzSwKqoE1TXLMoRs,1065
7
- parseapi-1.9.2.dist-info/RECORD,,