parseapi 1.10.6__tar.gz → 1.11.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 (60) hide show
  1. {parseapi-1.10.6 → parseapi-1.11.0}/PKG-INFO +3 -2
  2. {parseapi-1.10.6 → parseapi-1.11.0}/README.md +2 -1
  3. {parseapi-1.10.6 → parseapi-1.11.0}/pyproject.toml +1 -1
  4. {parseapi-1.10.6 → parseapi-1.11.0}/src/parseapi/__init__.py +1 -1
  5. {parseapi-1.10.6 → parseapi-1.11.0}/src/parseapi/_client.py +30 -0
  6. {parseapi-1.10.6 → parseapi-1.11.0}/.github/workflows/publish.yml +0 -0
  7. {parseapi-1.10.6 → parseapi-1.11.0}/.github/workflows/test.yml +0 -0
  8. {parseapi-1.10.6 → parseapi-1.11.0}/.gitignore +0 -0
  9. {parseapi-1.10.6 → parseapi-1.11.0}/CHANGELOG.md +0 -0
  10. {parseapi-1.10.6 → parseapi-1.11.0}/LICENSE +0 -0
  11. {parseapi-1.10.6 → parseapi-1.11.0}/api/public.json +0 -0
  12. {parseapi-1.10.6 → parseapi-1.11.0}/scripts/public_api.py +0 -0
  13. {parseapi-1.10.6 → parseapi-1.11.0}/smoke/smoke.py +0 -0
  14. {parseapi-1.10.6 → parseapi-1.11.0}/src/parseapi/city.py +0 -0
  15. {parseapi-1.10.6 → parseapi-1.11.0}/src/parseapi/py.typed +0 -0
  16. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/country-aq.json +0 -0
  17. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/country-corrected.json +0 -0
  18. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/country-de.json +0 -0
  19. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/emoji-artwork.json +0 -0
  20. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/emoji-catalog.json +0 -0
  21. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/iso-contract.json +0 -0
  22. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/measure-response.json +0 -0
  23. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/clean-company-coverage.json +0 -0
  24. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/clean-company-profile.json +0 -0
  25. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/clean-emoji-catalog.json +0 -0
  26. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/clean-emoji-metadata.json +0 -0
  27. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/clean-provider.json +0 -0
  28. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/clean-tariff-search.json +0 -0
  29. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/clean-tariff.json +0 -0
  30. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/clean-time.json +0 -0
  31. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/clean-timezones.json +0 -0
  32. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/standard-company-coverage.json +0 -0
  33. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/standard-company-profile.json +0 -0
  34. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/standard-emoji-catalog.json +0 -0
  35. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/standard-emoji-metadata.json +0 -0
  36. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/standard-provider.json +0 -0
  37. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/standard-tariff-search.json +0 -0
  38. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/standard-tariff.json +0 -0
  39. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/standard-time.json +0 -0
  40. {parseapi-1.10.6 → parseapi-1.11.0}/tests/fixtures/response-fixtures/standard-timezones.json +0 -0
  41. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_card_dx.py +0 -0
  42. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_city_canonical.py +0 -0
  43. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_city_quality.py +0 -0
  44. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_city_query_parity.py +0 -0
  45. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_client.py +0 -0
  46. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_company_directory.py +0 -0
  47. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_country_corrected.py +0 -0
  48. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_email_enrichment.py +0 -0
  49. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_emoji.py +0 -0
  50. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_iso_contract.py +0 -0
  51. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_language.py +0 -0
  52. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_name_formatting.py +0 -0
  53. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_postal_localities.py +0 -0
  54. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_public_api.py +0 -0
  55. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_response_decoding.py +0 -0
  56. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_stack.py +0 -0
  57. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_time_complete.py +0 -0
  58. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_time_gaps.py +0 -0
  59. {parseapi-1.10.6 → parseapi-1.11.0}/tests/test_version.py +0 -0
  60. {parseapi-1.10.6 → parseapi-1.11.0}/tests/typing_company_directory.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: parseapi
3
- Version: 1.10.6
3
+ Version: 1.11.0
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
@@ -201,7 +201,7 @@ Choose display names for one request:
201
201
  parse.country("DE", lang="fr")
202
202
  ```
203
203
 
204
- `lang` is optional on geography lookups and their lists/searches, Language, Date, Time/Timezone, Emoji lookup/search. IP, ASN and national Company number lookups also accept it for their geographic labels. Codes, native names, quantities and response structure retain their meanings. Source coverage determines which labels are translated; unavailable labels use the API's documented fallback.
204
+ `lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search. IP, ASN and national Company number lookups also accept it for their geographic labels. Codes, native names, quantities and response structure retain their meanings. Source coverage determines which labels are translated; unavailable labels use the API's documented fallback.
205
205
 
206
206
  The next call keeps its usual default unless it also supplies `lang`. Existing `deep` rules still apply. Date `format` remains an explicit input-parsing control.
207
207
 
@@ -294,6 +294,7 @@ Choose enrichment for the question you need answered.
294
294
  | Domain | Registration dates, registrar, status and DNSSEC, included with a paid plan. Use `dns` for DNS records and `mx` for mail routing. |
295
295
  | Email | A metered mailbox check with deliverability, catch-all, status, reason and address hints, using included email checks or enabled on-demand usage. |
296
296
  | Phone, Time, Date, Language, Emoji, Point | Optional detail in the same pooled request on every plan. |
297
+ | Currency | Currency metadata on paid plans; lookup and exchange-rate conversion use pooled requests. |
297
298
  | Country, State, District, City, Postal | The place profile on paid plans, including demographic and tax facts where held. |
298
299
  | Name, Industry | Name evidence or the industry definition profile on paid plans. |
299
300
  | Company | The complete product detail bag on paid plans. |
@@ -182,7 +182,7 @@ Choose display names for one request:
182
182
  parse.country("DE", lang="fr")
183
183
  ```
184
184
 
185
- `lang` is optional on geography lookups and their lists/searches, Language, Date, Time/Timezone, Emoji lookup/search. IP, ASN and national Company number lookups also accept it for their geographic labels. Codes, native names, quantities and response structure retain their meanings. Source coverage determines which labels are translated; unavailable labels use the API's documented fallback.
185
+ `lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search. IP, ASN and national Company number lookups also accept it for their geographic labels. Codes, native names, quantities and response structure retain their meanings. Source coverage determines which labels are translated; unavailable labels use the API's documented fallback.
186
186
 
187
187
  The next call keeps its usual default unless it also supplies `lang`. Existing `deep` rules still apply. Date `format` remains an explicit input-parsing control.
188
188
 
@@ -275,6 +275,7 @@ Choose enrichment for the question you need answered.
275
275
  | Domain | Registration dates, registrar, status and DNSSEC, included with a paid plan. Use `dns` for DNS records and `mx` for mail routing. |
276
276
  | Email | A metered mailbox check with deliverability, catch-all, status, reason and address hints, using included email checks or enabled on-demand usage. |
277
277
  | Phone, Time, Date, Language, Emoji, Point | Optional detail in the same pooled request on every plan. |
278
+ | Currency | Currency metadata on paid plans; lookup and exchange-rate conversion use pooled requests. |
278
279
  | Country, State, District, City, Postal | The place profile on paid plans, including demographic and tax facts where held. |
279
280
  | Name, Industry | Name evidence or the industry definition profile on paid plans. |
280
281
  | Company | The complete product detail bag on paid plans. |
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "parseapi"
7
- version = "1.10.6"
7
+ version = "1.11.0"
8
8
  description = "Official ParseAPI client for Python. One key, minimal JSON, fast."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -3,5 +3,5 @@
3
3
  from .city import CityAmbiguityCandidate
4
4
  from ._client import AsyncParseAPI, ParseAPI, ParseAPIError
5
5
 
6
- __version__ = "1.10.6"
6
+ __version__ = "1.11.0"
7
7
  __all__ = ["CityAmbiguityCandidate", "ParseAPI", "AsyncParseAPI", "ParseAPIError", "__version__"]
@@ -1276,3 +1276,33 @@ def _time_targets(targets: Optional[list[str]], to: Optional[str]) -> Optional[s
1276
1276
 
1277
1277
  def _city_csv(value: Optional[Union[str, Sequence[str]]]) -> Optional[str]:
1278
1278
  return value if isinstance(value, str) or value is None else ",".join(value)
1279
+
1280
+
1281
+ class _CurrencySync:
1282
+ def __init__(self, client: ParseAPI):
1283
+ self._client = client
1284
+
1285
+ def __call__(self, code: str, *, deep: bool = False, lang: Optional[str] = None) -> Json:
1286
+ return self._client._get(f"/currency/{_seg(code)}", {"deep": deep, "lang": lang})
1287
+
1288
+ def rate(
1289
+ self, base: str, quote_currency: str, *, date: Optional[str] = None, amount: Optional[float] = None
1290
+ ) -> Json:
1291
+ return self._client._get(
1292
+ f"/currency/{_seg(base)}/{_seg(quote_currency)}", {"date": date, "amount": amount}
1293
+ )
1294
+
1295
+
1296
+ class _CurrencyAsync:
1297
+ def __init__(self, client: AsyncParseAPI):
1298
+ self._client = client
1299
+
1300
+ async def __call__(self, code: str, *, deep: bool = False, lang: Optional[str] = None) -> Json:
1301
+ return await self._client._get(f"/currency/{_seg(code)}", {"deep": deep, "lang": lang})
1302
+
1303
+ async def rate(
1304
+ self, base: str, quote_currency: str, *, date: Optional[str] = None, amount: Optional[float] = None
1305
+ ) -> Json:
1306
+ return await self._client._get(
1307
+ f"/currency/{_seg(base)}/{_seg(quote_currency)}", {"date": date, "amount": amount}
1308
+ )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes