parseapi 0.4.0__tar.gz → 1.0.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.
- {parseapi-0.4.0 → parseapi-1.0.0}/PKG-INFO +24 -5
- {parseapi-0.4.0 → parseapi-1.0.0}/README.md +23 -4
- {parseapi-0.4.0 → parseapi-1.0.0}/api/public.json +408 -0
- {parseapi-0.4.0 → parseapi-1.0.0}/pyproject.toml +1 -1
- {parseapi-0.4.0 → parseapi-1.0.0}/src/parseapi/__init__.py +1 -1
- {parseapi-0.4.0 → parseapi-1.0.0}/src/parseapi/_client.py +141 -134
- {parseapi-0.4.0 → parseapi-1.0.0}/tests/test_client.py +4 -4
- parseapi-1.0.0/tests/test_language.py +93 -0
- parseapi-1.0.0/tests/test_name_formatting.py +36 -0
- parseapi-1.0.0/tests/test_version.py +37 -0
- {parseapi-0.4.0 → parseapi-1.0.0}/.github/workflows/publish.yml +0 -0
- {parseapi-0.4.0 → parseapi-1.0.0}/.github/workflows/test.yml +0 -0
- {parseapi-0.4.0 → parseapi-1.0.0}/.gitignore +0 -0
- {parseapi-0.4.0 → parseapi-1.0.0}/LICENSE +0 -0
- {parseapi-0.4.0 → parseapi-1.0.0}/scripts/public_api.py +0 -0
- {parseapi-0.4.0 → parseapi-1.0.0}/smoke/smoke.py +0 -0
- {parseapi-0.4.0 → parseapi-1.0.0}/src/parseapi/py.typed +0 -0
- {parseapi-0.4.0 → parseapi-1.0.0}/tests/test_public_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: parseapi
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.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
|
|
@@ -36,11 +36,13 @@ Get a key at [parseapi.com](https://parseapi.com). The client also reads `PARSEA
|
|
|
36
36
|
|
|
37
37
|
## API versions
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Version 1.0.0 explicitly selects the API contract supported by this SDK. It sends `Parse-Version: 2.0.0` on every lookup so responses match the API contract supported by the package. Your key and the team's saved default stay the same.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Upgrade the dependency in staging, review the [release notes](https://parseapi.com/docs/releases), and test the application before deploying the same code and dependency version to production. Commit your dependency lockfile so the tested package travels with your deployment. Future major SDK upgrades can select a newer API contract.
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Previously published SDKs keep their existing behavior and use the team's default. Requests without `Parse-Version` also use that default, managed in [Dashboard API version](https://parseapi.com/dashboard/versions). Keep it unchanged while older applications depend on it. Rolling back to an SDK without a version header restores the team default, so rollback only restores the old contract when that default has stayed unchanged.
|
|
44
|
+
|
|
45
|
+
The package owns its supported API version. For direct HTTP integrations, an explicit `Parse-Version` header selects a supported contract. See [API versions and migration](https://parseapi.com/docs/versioning).
|
|
44
46
|
|
|
45
47
|
## Weather from a postal code
|
|
46
48
|
|
|
@@ -107,6 +109,7 @@ parse.currency.rate("USD", "EUR")
|
|
|
107
109
|
parse.language("en")
|
|
108
110
|
parse.name("BILLY OSHALL")
|
|
109
111
|
parse.name("Andrea", country="IT", deep=True)
|
|
112
|
+
parse.name("Robert James Smith", deep=True, name_locale="en")
|
|
110
113
|
parse.time() # UTC now
|
|
111
114
|
parse.time("America/New_York")
|
|
112
115
|
parse.time("America/New_York", at="2026-09-05T15:00:00", to="Europe/London")
|
|
@@ -151,6 +154,20 @@ async with AsyncParseAPI("your-api-key") as parse:
|
|
|
151
154
|
country = await parse.country("US")
|
|
152
155
|
```
|
|
153
156
|
|
|
157
|
+
Name paid deep includes flat `short`, `directory`, and `initials` fields beside `gender` and `salutation`. `name_locale` selects CLDR formatting rules and defaults to `en`. It changes formatting only. Country remains gender context, and unavailable formatting is null. Older responses may omit these fields.
|
|
158
|
+
|
|
159
|
+
## Display language
|
|
160
|
+
|
|
161
|
+
Choose display names for one request:
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
parse.country("DE", lang="fr")
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
`lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search, and unit discovery. IP, ASN, Company and NPI 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.
|
|
168
|
+
|
|
169
|
+
The next call keeps its usual default unless it also supplies `lang`. Existing `deep` rules still apply. Date `format` and measurement `locale` remain explicit input-parsing controls.
|
|
170
|
+
|
|
154
171
|
## Time
|
|
155
172
|
|
|
156
173
|
`time` returns local ISO `at` with its UTC offset and integer Unix seconds in `unix`. The core `offset` preserves exact precision. Optional `deep.offset_seconds` gives the numeric offset, while `deep.offset_minutes` gives whole minutes. Historical offsets and ISO times can include offset seconds. Omitted `at` means now. With `to`, an offsetless `at` is source wall time. Otherwise it is UTC. Include an offset for repeated local times around a clock change. Current time and conversion use pooled requests on every plan. Coordinate clock fields can be null when the timezone is unknown. Existing `timezone` methods remain supported.
|
|
@@ -175,7 +192,9 @@ place = parse.postal("28202", country="US", deep=True)
|
|
|
175
192
|
property_tax = (place.get("deep") or {}).get("property_tax")
|
|
176
193
|
```
|
|
177
194
|
|
|
178
|
-
Read `population_period` alongside `population`: a reporting year (`YYYY`) or period (`YYYY-YYYY`), null when unknown or unverifiable. Keep missing or null values unknown and preserve a known zero. These fields belong to full place profiles. State district lists include each district's population and period. Postal nearby and distance detail remains metropolitan associations only. Continent population
|
|
195
|
+
Read `population_period` alongside `population`: a reporting year (`YYYY`) or period (`YYYY-YYYY`), null when unknown or unverifiable. Keep missing or null values unknown and preserve a known zero. These fields belong to full place profiles. State district lists include each district's population and period. Postal nearby and distance detail remains metropolitan associations only. Continent population stays in core.
|
|
196
|
+
|
|
197
|
+
Country deep includes `land_area` and `water_area` in km2, `coastline` in km, and mean `elevation` in metres. `lowest_point` and `highest_point` contain a nullable `name` and an `elevation` in metres. Values below sea level are negative. Missing or null values stay unknown, and zero stays zero.
|
|
179
198
|
|
|
180
199
|
Point returns the timezone ID with the core location. Its optional deep detail adds terrain and compact nearest-city context on every plan. A nearest city is null when none is within 200 km.
|
|
181
200
|
|
|
@@ -17,11 +17,13 @@ Get a key at [parseapi.com](https://parseapi.com). The client also reads `PARSEA
|
|
|
17
17
|
|
|
18
18
|
## API versions
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Version 1.0.0 explicitly selects the API contract supported by this SDK. It sends `Parse-Version: 2.0.0` on every lookup so responses match the API contract supported by the package. Your key and the team's saved default stay the same.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Upgrade the dependency in staging, review the [release notes](https://parseapi.com/docs/releases), and test the application before deploying the same code and dependency version to production. Commit your dependency lockfile so the tested package travels with your deployment. Future major SDK upgrades can select a newer API contract.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Previously published SDKs keep their existing behavior and use the team's default. Requests without `Parse-Version` also use that default, managed in [Dashboard API version](https://parseapi.com/dashboard/versions). Keep it unchanged while older applications depend on it. Rolling back to an SDK without a version header restores the team default, so rollback only restores the old contract when that default has stayed unchanged.
|
|
25
|
+
|
|
26
|
+
The package owns its supported API version. For direct HTTP integrations, an explicit `Parse-Version` header selects a supported contract. See [API versions and migration](https://parseapi.com/docs/versioning).
|
|
25
27
|
|
|
26
28
|
## Weather from a postal code
|
|
27
29
|
|
|
@@ -88,6 +90,7 @@ parse.currency.rate("USD", "EUR")
|
|
|
88
90
|
parse.language("en")
|
|
89
91
|
parse.name("BILLY OSHALL")
|
|
90
92
|
parse.name("Andrea", country="IT", deep=True)
|
|
93
|
+
parse.name("Robert James Smith", deep=True, name_locale="en")
|
|
91
94
|
parse.time() # UTC now
|
|
92
95
|
parse.time("America/New_York")
|
|
93
96
|
parse.time("America/New_York", at="2026-09-05T15:00:00", to="Europe/London")
|
|
@@ -132,6 +135,20 @@ async with AsyncParseAPI("your-api-key") as parse:
|
|
|
132
135
|
country = await parse.country("US")
|
|
133
136
|
```
|
|
134
137
|
|
|
138
|
+
Name paid deep includes flat `short`, `directory`, and `initials` fields beside `gender` and `salutation`. `name_locale` selects CLDR formatting rules and defaults to `en`. It changes formatting only. Country remains gender context, and unavailable formatting is null. Older responses may omit these fields.
|
|
139
|
+
|
|
140
|
+
## Display language
|
|
141
|
+
|
|
142
|
+
Choose display names for one request:
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
parse.country("DE", lang="fr")
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
`lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search, and unit discovery. IP, ASN, Company and NPI 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.
|
|
149
|
+
|
|
150
|
+
The next call keeps its usual default unless it also supplies `lang`. Existing `deep` rules still apply. Date `format` and measurement `locale` remain explicit input-parsing controls.
|
|
151
|
+
|
|
135
152
|
## Time
|
|
136
153
|
|
|
137
154
|
`time` returns local ISO `at` with its UTC offset and integer Unix seconds in `unix`. The core `offset` preserves exact precision. Optional `deep.offset_seconds` gives the numeric offset, while `deep.offset_minutes` gives whole minutes. Historical offsets and ISO times can include offset seconds. Omitted `at` means now. With `to`, an offsetless `at` is source wall time. Otherwise it is UTC. Include an offset for repeated local times around a clock change. Current time and conversion use pooled requests on every plan. Coordinate clock fields can be null when the timezone is unknown. Existing `timezone` methods remain supported.
|
|
@@ -156,7 +173,9 @@ place = parse.postal("28202", country="US", deep=True)
|
|
|
156
173
|
property_tax = (place.get("deep") or {}).get("property_tax")
|
|
157
174
|
```
|
|
158
175
|
|
|
159
|
-
Read `population_period` alongside `population`: a reporting year (`YYYY`) or period (`YYYY-YYYY`), null when unknown or unverifiable. Keep missing or null values unknown and preserve a known zero. These fields belong to full place profiles. State district lists include each district's population and period. Postal nearby and distance detail remains metropolitan associations only. Continent population
|
|
176
|
+
Read `population_period` alongside `population`: a reporting year (`YYYY`) or period (`YYYY-YYYY`), null when unknown or unverifiable. Keep missing or null values unknown and preserve a known zero. These fields belong to full place profiles. State district lists include each district's population and period. Postal nearby and distance detail remains metropolitan associations only. Continent population stays in core.
|
|
177
|
+
|
|
178
|
+
Country deep includes `land_area` and `water_area` in km2, `coastline` in km, and mean `elevation` in metres. `lowest_point` and `highest_point` contain a nullable `name` and an `elevation` in metres. Values below sea level are negative. Missing or null values stay unknown, and zero stays zero.
|
|
160
179
|
|
|
161
180
|
Point returns the timezone ID with the core location. Its optional deep detail adds terrain and compact nearest-city context on every plan. A nearest city is null when none is within 200 km.
|
|
162
181
|
|