parseapi 1.10.6__tar.gz → 1.11.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 (60) hide show
  1. {parseapi-1.10.6 → parseapi-1.11.1}/PKG-INFO +10 -3
  2. {parseapi-1.10.6 → parseapi-1.11.1}/README.md +9 -2
  3. {parseapi-1.10.6 → parseapi-1.11.1}/pyproject.toml +1 -1
  4. {parseapi-1.10.6 → parseapi-1.11.1}/src/parseapi/__init__.py +1 -1
  5. {parseapi-1.10.6 → parseapi-1.11.1}/src/parseapi/_client.py +30 -0
  6. {parseapi-1.10.6 → parseapi-1.11.1}/.github/workflows/publish.yml +0 -0
  7. {parseapi-1.10.6 → parseapi-1.11.1}/.github/workflows/test.yml +0 -0
  8. {parseapi-1.10.6 → parseapi-1.11.1}/.gitignore +0 -0
  9. {parseapi-1.10.6 → parseapi-1.11.1}/CHANGELOG.md +0 -0
  10. {parseapi-1.10.6 → parseapi-1.11.1}/LICENSE +0 -0
  11. {parseapi-1.10.6 → parseapi-1.11.1}/api/public.json +0 -0
  12. {parseapi-1.10.6 → parseapi-1.11.1}/scripts/public_api.py +0 -0
  13. {parseapi-1.10.6 → parseapi-1.11.1}/smoke/smoke.py +0 -0
  14. {parseapi-1.10.6 → parseapi-1.11.1}/src/parseapi/city.py +0 -0
  15. {parseapi-1.10.6 → parseapi-1.11.1}/src/parseapi/py.typed +0 -0
  16. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/country-aq.json +0 -0
  17. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/country-corrected.json +0 -0
  18. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/country-de.json +0 -0
  19. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/emoji-artwork.json +0 -0
  20. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/emoji-catalog.json +0 -0
  21. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/iso-contract.json +0 -0
  22. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/measure-response.json +0 -0
  23. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/clean-company-coverage.json +0 -0
  24. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/clean-company-profile.json +0 -0
  25. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/clean-emoji-catalog.json +0 -0
  26. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/clean-emoji-metadata.json +0 -0
  27. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/clean-provider.json +0 -0
  28. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/clean-tariff-search.json +0 -0
  29. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/clean-tariff.json +0 -0
  30. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/clean-time.json +0 -0
  31. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/clean-timezones.json +0 -0
  32. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/standard-company-coverage.json +0 -0
  33. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/standard-company-profile.json +0 -0
  34. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/standard-emoji-catalog.json +0 -0
  35. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/standard-emoji-metadata.json +0 -0
  36. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/standard-provider.json +0 -0
  37. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/standard-tariff-search.json +0 -0
  38. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/standard-tariff.json +0 -0
  39. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/standard-time.json +0 -0
  40. {parseapi-1.10.6 → parseapi-1.11.1}/tests/fixtures/response-fixtures/standard-timezones.json +0 -0
  41. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_card_dx.py +0 -0
  42. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_city_canonical.py +0 -0
  43. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_city_quality.py +0 -0
  44. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_city_query_parity.py +0 -0
  45. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_client.py +0 -0
  46. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_company_directory.py +0 -0
  47. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_country_corrected.py +0 -0
  48. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_email_enrichment.py +0 -0
  49. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_emoji.py +0 -0
  50. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_iso_contract.py +0 -0
  51. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_language.py +0 -0
  52. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_name_formatting.py +0 -0
  53. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_postal_localities.py +0 -0
  54. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_public_api.py +0 -0
  55. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_response_decoding.py +0 -0
  56. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_stack.py +0 -0
  57. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_time_complete.py +0 -0
  58. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_time_gaps.py +0 -0
  59. {parseapi-1.10.6 → parseapi-1.11.1}/tests/test_version.py +0 -0
  60. {parseapi-1.10.6 → parseapi-1.11.1}/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.1
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
 
@@ -253,7 +253,7 @@ Source deep adds `standard_offset`, `standard_offset_seconds`, signed `dst_offse
253
253
 
254
254
  ## Place statistics and optional detail
255
255
 
256
- Country Core contains the everyday reference: `name`, `name_full`, `name_local`, demonym, `iso_alpha3` and `iso_numeric` country identifiers, continent, region and subregion, currency, calling code, `flag`, language and timezone codes, borders, bloc memberships and `capital: { name, lat, lon }`. Paid Deep adds specialist detail, including population, total area and national statistics. `gdp_usd` and `gdp_per_capita_usd` are current US dollars; `population_growth_percent`, `urban_population_percent` and `internet_users_percent` use a 0–100 percent scale (growth can be negative or exceed 100). GDP per person and these three percentages round once to two decimals in the API response. `elevation_average` is average terrain elevation in meters; `lowest_point.elevation` and `highest_point.elevation` keep their point-specific meaning. Unknown stays null and a known zero stays zero. Country tax references are grouped once as `deep.tax: { name, rate }`; the rate remains a percentage. Read capital from the Core object and read the tax name and rate from the Deep tax object.
256
+ Country Core contains the everyday reference: `name`, `name_full`, `name_local`, demonym, `iso_alpha3` and `iso_numeric` country identifiers, continent, region and subregion, currency, calling code, `flag`, language and timezone codes, borders, bloc memberships and `capital: { name, latitude, longitude }`. Paid Deep adds specialist detail, including population, total area and national statistics. `gdp_usd` and `gdp_per_capita_usd` are current US dollars; `population_growth_percent`, `urban_population_percent` and `internet_users_percent` use a 0–100 percent scale (growth can be negative or exceed 100). GDP per person and these three percentages round once to two decimals in the API response. `elevation_average` is average terrain elevation in meters; `lowest_point.elevation` and `highest_point.elevation` keep their point-specific meaning. Unknown stays null and a known zero stays zero. Country tax references are grouped once as `deep.tax: { name, rate }`; the rate remains a percentage. Read capital from the Core object and read the tax name and rate from the Deep tax object.
257
257
 
258
258
  Australian postal lookups include core `localities` with suburb choices (`city`, `state`, `state_name`) on every plan. Null or an omitted field means unknown, while `[]` means the reviewed reference has no eligible choices. `city` stays null when the source is ambiguous, even if there is only one eligible choice. Let the user select their suburb and keep manual entry available. These are geographic choices, not mailing-address verification. [G-NAF source, adaptations and licence](https://parseapi.com/legal/attribution#postal-au).
259
259
 
@@ -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. |
@@ -498,3 +499,9 @@ Coverage by country and available fields is described at https://parseapi.com/ci
498
499
 
499
500
 
500
501
  Conditional `If-None-Match` reads and GeoJSON currently use HTTP directly. A matching City ETag returns 304 without a body; ordinary billing and rate limits apply. These JSON client methods do not supply conditional-cache handling.
502
+
503
+ ## Capital coordinate migration
504
+
505
+ Country and State capital coordinates use `latitude` and `longitude`. Update
506
+ `capital.lat` and `capital.lon` reads to `capital.latitude` and
507
+ `capital.longitude` when adopting this release.
@@ -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
 
@@ -234,7 +234,7 @@ Source deep adds `standard_offset`, `standard_offset_seconds`, signed `dst_offse
234
234
 
235
235
  ## Place statistics and optional detail
236
236
 
237
- Country Core contains the everyday reference: `name`, `name_full`, `name_local`, demonym, `iso_alpha3` and `iso_numeric` country identifiers, continent, region and subregion, currency, calling code, `flag`, language and timezone codes, borders, bloc memberships and `capital: { name, lat, lon }`. Paid Deep adds specialist detail, including population, total area and national statistics. `gdp_usd` and `gdp_per_capita_usd` are current US dollars; `population_growth_percent`, `urban_population_percent` and `internet_users_percent` use a 0–100 percent scale (growth can be negative or exceed 100). GDP per person and these three percentages round once to two decimals in the API response. `elevation_average` is average terrain elevation in meters; `lowest_point.elevation` and `highest_point.elevation` keep their point-specific meaning. Unknown stays null and a known zero stays zero. Country tax references are grouped once as `deep.tax: { name, rate }`; the rate remains a percentage. Read capital from the Core object and read the tax name and rate from the Deep tax object.
237
+ Country Core contains the everyday reference: `name`, `name_full`, `name_local`, demonym, `iso_alpha3` and `iso_numeric` country identifiers, continent, region and subregion, currency, calling code, `flag`, language and timezone codes, borders, bloc memberships and `capital: { name, latitude, longitude }`. Paid Deep adds specialist detail, including population, total area and national statistics. `gdp_usd` and `gdp_per_capita_usd` are current US dollars; `population_growth_percent`, `urban_population_percent` and `internet_users_percent` use a 0–100 percent scale (growth can be negative or exceed 100). GDP per person and these three percentages round once to two decimals in the API response. `elevation_average` is average terrain elevation in meters; `lowest_point.elevation` and `highest_point.elevation` keep their point-specific meaning. Unknown stays null and a known zero stays zero. Country tax references are grouped once as `deep.tax: { name, rate }`; the rate remains a percentage. Read capital from the Core object and read the tax name and rate from the Deep tax object.
238
238
 
239
239
  Australian postal lookups include core `localities` with suburb choices (`city`, `state`, `state_name`) on every plan. Null or an omitted field means unknown, while `[]` means the reviewed reference has no eligible choices. `city` stays null when the source is ambiguous, even if there is only one eligible choice. Let the user select their suburb and keep manual entry available. These are geographic choices, not mailing-address verification. [G-NAF source, adaptations and licence](https://parseapi.com/legal/attribution#postal-au).
240
240
 
@@ -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. |
@@ -479,3 +480,9 @@ Coverage by country and available fields is described at https://parseapi.com/ci
479
480
 
480
481
 
481
482
  Conditional `If-None-Match` reads and GeoJSON currently use HTTP directly. A matching City ETag returns 304 without a body; ordinary billing and rate limits apply. These JSON client methods do not supply conditional-cache handling.
483
+
484
+ ## Capital coordinate migration
485
+
486
+ Country and State capital coordinates use `latitude` and `longitude`. Update
487
+ `capital.lat` and `capital.lon` reads to `capital.latitude` and
488
+ `capital.longitude` when adopting this release.
@@ -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.1"
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.1"
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