Skip to content

Commit e552a95

Browse files
committed
Retire Provider, Tariff, VAT and Bloc clients
1 parent a6fefaf commit e552a95

10 files changed

Lines changed: 13 additions & 676 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Pass `country` when a postal code or national phone number needs disambiguation.
4545

4646
Results are plain data. Pass a returned code or coordinate to another operation when the task needs it. Check nullable values before composing the next call.
4747

48-
Use `parse.postal("28202", country="US", deep=True)` for US ZIP tax references. `deep.tax` names the levy and `deep.tax_rate` is a percentage, so `7.9` means 7.9%. The state, county, city and special components explain that combined rate. An exact address can differ. Country and state lookups provide their own geographic reference rates, which should not be added to the ZIP rate. `None` means unknown and `0` means known zero. Country `deep.tax_id_format` and `deep.tax_id_regex` describe registration-number format only. Use `vat` for a metered registration check with `deep` explicitly enabled.
48+
Use `parse.postal("28202", country="US", deep=True)` for US ZIP tax references. `deep.tax` names the levy and `deep.tax_rate` is a percentage, so `7.9` means 7.9%. The state, county, city and special components explain that combined rate. An exact address can differ. Country and state lookups provide their own geographic reference rates, which should not be added to the ZIP rate. `None` means unknown and `0` means known zero. Country `deep.tax_id_format` and `deep.tax_id_regex` describe registration-number format only. Use for a metered registration check with `deep` explicitly enabled.
4949

5050
## Company directory
5151

@@ -85,10 +85,8 @@ One method per endpoint, named after the route.
8585
parse.ip("8.8.8.8")
8686
parse.ip.self()
8787
parse.email("hello@gmail.com")
88-
parse.vat("DE136695976")
8988
parse.bank("DE89370400440532013000")
9089
parse.card("424242")
91-
parse.provider("1881018208")
9290
parse.phone("+14155552671")
9391
parse.carrier("+14155552671")
9492
parse.caller("+14155552671")
@@ -118,8 +116,6 @@ parse.state.districts("NC", country="US")
118116
parse.district("37081")
119117
parse.continent("NA")
120118
parse.continent.countries("NA")
121-
parse.bloc("EU")
122-
parse.bloc.countries("EU")
123119
parse.currency("USD")
124120
parse.currency.rate("USD", "EUR")
125121
parse.language("en")
@@ -146,8 +142,6 @@ parse.dns("_dmarc.example.com", type="TXT")
146142
parse.useragent(ua_string)
147143
parse.industry("541511")
148144
parse.industry.search("coffee shop", limit=5)
149-
parse.tariff("8471.30.01.00")
150-
parse.tariff.search("sunglasses")
151145
parse.emoji("rocket")
152146
parse.emoji.search("fire")
153147
```
@@ -181,7 +175,7 @@ Choose display names for one request:
181175
parse.country("DE", lang="fr")
182176
```
183177

184-
`lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search, and unit discovery. IP, ASN, national Company number lookup 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.
178+
`lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search, and unit discovery. 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.
185179

186180
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.
187181

@@ -267,19 +261,6 @@ Weather returns current conditions by default. Paid deep adds specialist current
267261
parse.weather(40.7128, -74.006, deep=True, date="2026-08-15")
268262
```
269263

270-
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.
271-
272-
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.
273-
274-
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.
275-
276-
Codes contain 4, 6, 8 or 10 ASCII digits; dots and whitespace are optional. Search returns up to 20 description matches with parent `lineage` so a result named "Other" has context. Search is not product classification. In deep, `measures: null` means origin-dependent measures were not resolved. `measures: []` means the resolved lookup found none.
277-
278-
```python
279-
parse.tariff("8471.30.01.00")
280-
parse.tariff("8471.30.01.00", deep=True)
281-
parse.tariff("8471.30.01.00", deep=True, origin="CN")
282-
```
283264

284265
Address search uses context from the form: prefer postal, or city and state. An optional end-user `ip` is a locality hint for server-side calls. An empty result explains itself with `reason`: `more_input`, `missing_context` or `no_matches`. With suggestions, reason is null. Older responses may omit it, and future reasons remain strings. Catalog and lookup failures use the existing API errors.
285266

@@ -296,21 +277,6 @@ parse.bank_requirements("US", format="us_ach")
296277
parse.bank_us_ach(routing="011000015", account="0001234567")
297278
```
298279

299-
## Provider lookup
300-
301-
```python
302-
provider = parse.provider("1881018208")
303-
profile = parse.provider("1881018208", deep=True)
304-
```
305-
306-
Pass the original NPI as a string. `valid` checks its format and checksum; `registered` means a match in the stored NPPES snapshot. `active` reflects recorded NPI deactivation, not licensure. `excluded` is an NPI-only OIG LEIE match; `false` is not a complete exclusion clearance. These directory facts do not verify credentials, current practice contact or payment eligibility.
307-
308-
Invalid input returns `valid: false` with unknown provider fields. A checksum-valid number missing from the snapshot returns `registered: false`; unavailable storage remains an API error. Preserve `null` as unknown.
309-
310-
The default pooled lookup includes provider identity, specialty and practice contact where held. Paid `deep` adds `deactivated_at`, `medicare`, `opt_out` and `enrollments` from stored source files, with no separate check meter or live verification. `enrollments: null` means unavailable; `[]` means no enrollment rows are returned. The API omits unrequested `deep` and returns `{}` when requested on Free.
311-
312-
Paid Deep also returns `taxonomies` in published order, with taxonomy code, specialty label, primary flag and provider-reported license number/state, plus `enumerated_at`, `updated_at` and `reactivated_at` record dates. Reported licenses are not verified licenses. Null lists mean unavailable; empty lists mean the edition contains no entries. Provider record dates describe the provider record. Unknown dates stay null.
313-
314280
## Deep
315281

316282
Choose enrichment for the question you need answered.
@@ -320,12 +286,10 @@ Choose enrichment for the question you need answered.
320286
| IP | Richer IP fields included with a paid plan. No separate check meter. |
321287
| Domain | Registration dates, registrar, status and DNSSEC, included with a paid plan. Use `dns` for DNS records and `mx` for mail routing. |
322288
| Email | A metered mailbox check with deliverability, catch-all, status, reason and address hints, using included email checks or enabled on-demand usage. |
323-
| VAT | A metered registry check where supported, using included VAT checks or enabled on-demand usage. |
324289
| Phone, Time, Date, Currency, Language, Emoji, Bank, Point | Optional detail in the same pooled request on every plan. |
325290
| Country, State, District, City, Postal | The place profile on paid plans, including demographic and tax facts where held. |
326291
| Name, Industry | Name evidence or the industry definition profile on paid plans. |
327-
| NPI | Deactivation date, Medicare enrollment, opt-out and enrollment rows from stored sources on paid plans. Exclusion evidence stays core. |
328-
| Tariff, Company | The complete product detail bag on paid plans. |
292+
| Company | The complete product detail bag on paid plans. |
329293
| Weather | Specialist current measurements and the existing forecast, alert, air and history bag on paid plans. |
330294
| Carrier, HLR | Optional diagnostic detail within the same metered core unit, including Free allowance units. No second gate or additional check. |
331295

@@ -369,7 +333,7 @@ parse = ParseAPI(
369333

370334
Requires Python 3.9 or later. One dependency (httpx).
371335

372-
Ordinary lookups retry network failures, 429, and 500/502/503/504 responses twice by default. Carrier, caller, HLR, and email or VAT with `deep=True` make one attempt by default. Address with `deep=True` also uses one attempt, reserving the same behavior for future verification.
336+
Ordinary lookups retry network failures, 429, and 500/502/503/504 responses twice by default. Carrier, caller, HLR, and email with `deep=True` make one attempt by default. Address with `deep=True` also uses one attempt, reserving the same behavior for future verification.
373337

374338
An explicit client `retries` setting overrides those defaults; `retries=0` always makes one attempt. Another attempt can consume additional usage if the earlier response was lost. Cancelling an async task stops the call and any retry wait. Automatic redirects are disabled.
375339

@@ -515,7 +479,6 @@ Reviewed children, ancestors and siblings use canonical lists with partial relat
515479
Strict `ambiguity=error` can return HTTP 409 `ambiguous_city` with up to two safe candidate identities. The existing error constructor and unrelated error metadata are preserved; candidates are retained only for that status/code and never contain Deep. GeoJSON is available through HTTP; these typed City list methods do not return GeoJSON.
516480

517481

518-
519482
Reviewed name forms:
520483

521484
```python

0 commit comments

Comments
 (0)