tarifftrust 0.3.0__tar.gz → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tarifftrust
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Official Python client for the TariffTrust API: every US import duty and fee for an HTS code, an origin and a value, each with its official source.
5
5
  Project-URL: Homepage, https://tarifftrust.com/api/
6
6
  Project-URL: Documentation, https://tarifftrust.com/api/reference/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tarifftrust"
3
- version = "0.3.0"
3
+ version = "0.3.1"
4
4
  description = "Official Python client for the TariffTrust API: every US import duty and fee for an HTS code, an origin and a value, each with its official source."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -122,8 +122,10 @@ class Operations:
122
122
  for KORUS…; GET /v2/agreements). Giving it declares that the goods meet its
123
123
  rules of origin and that you hold the proof.
124
124
  publication_id: Calculate with this publication of the rules instead of the one in
125
- service on that date: the data.publication_id of an earlier answer gives the
126
- same result again, as long as the engine has not changed.
125
+ service on that date: the data.publication_id of an earlier answer gives its
126
+ rates and rules again, as long as the engine has not changed. What withholds an
127
+ estimate today (an incident, an official notice not yet read, an exclusion from
128
+ importation) still applies: a saved estimate alone keeps its result.
127
129
  quantities: Quantities in the units a duty counts (kg, l, item, dozen, pair,
128
130
  proof_liter…), nonnegative. An answer names the quantity it needs in missing
129
131
  ("quantities.kg").
@@ -168,8 +170,10 @@ class Operations:
168
170
  Args:
169
171
  items: The products, each calculated on its own.
170
172
  publication_id: Calculate with this publication of the rules instead of the one in
171
- service on that date: the data.publication_id of an earlier answer gives the
172
- same result again, as long as the engine has not changed.
173
+ service on that date: the data.publication_id of an earlier answer gives its
174
+ rates and rules again, as long as the engine has not changed. What withholds an
175
+ estimate today (an incident, an official notice not yet read, an exclusion from
176
+ importation) still applies: a saved estimate alone keeps its result.
173
177
  idempotency_key: Makes a retry of this call safe; a new one is generated for each
174
178
  call otherwise.
175
179
  """
@@ -214,8 +218,9 @@ class Operations:
214
218
  entry_type: A formal entry pays the merchandise processing fee (MPF) on its value.
215
219
  An informal entry pays a fixed fee the estimate does not calculate: it gives no
216
220
  fees.
217
- facts: Answers that hold for the whole declaration (GET /v2/facts, scope entry or
218
- shipment).
221
+ facts: Answers that hold for every line of the declaration, by name (GET /v2/facts):
222
+ a line's own answer comes first. Given here, mpf_exempt holds for the lines
223
+ entered under an agreement, and hmf_exempt for the declaration.
219
224
  freight: International freight in US dollars: no duty on it, it adds to the landed
220
225
  cost.
221
226
  include_fees: Count the entry fees (MPF, HMF) of the declaration.
@@ -223,8 +228,10 @@ class Operations:
223
228
  landed cost.
224
229
  label: A name for the saved estimate; needs save.
225
230
  publication_id: Calculate with this publication of the rules instead of the one in
226
- service on that date: the data.publication_id of an earlier answer gives the
227
- same result again, as long as the engine has not changed.
231
+ service on that date: the data.publication_id of an earlier answer gives its
232
+ rates and rules again, as long as the engine has not changed. What withholds an
233
+ estimate today (an incident, an official notice not yet read, an exclusion from
234
+ importation) still applies: a saved estimate alone keeps its result.
228
235
  reference: Your reference for the declaration.
229
236
  save: Save the estimate: only a saved estimate keeps its detail, is reported, and is
230
237
  notified if a rate proves wrong. An answer without a figure is not saved. Send
@@ -527,8 +534,10 @@ class AsyncOperations:
527
534
  for KORUS…; GET /v2/agreements). Giving it declares that the goods meet its
528
535
  rules of origin and that you hold the proof.
529
536
  publication_id: Calculate with this publication of the rules instead of the one in
530
- service on that date: the data.publication_id of an earlier answer gives the
531
- same result again, as long as the engine has not changed.
537
+ service on that date: the data.publication_id of an earlier answer gives its
538
+ rates and rules again, as long as the engine has not changed. What withholds an
539
+ estimate today (an incident, an official notice not yet read, an exclusion from
540
+ importation) still applies: a saved estimate alone keeps its result.
532
541
  quantities: Quantities in the units a duty counts (kg, l, item, dozen, pair,
533
542
  proof_liter…), nonnegative. An answer names the quantity it needs in missing
534
543
  ("quantities.kg").
@@ -573,8 +582,10 @@ class AsyncOperations:
573
582
  Args:
574
583
  items: The products, each calculated on its own.
575
584
  publication_id: Calculate with this publication of the rules instead of the one in
576
- service on that date: the data.publication_id of an earlier answer gives the
577
- same result again, as long as the engine has not changed.
585
+ service on that date: the data.publication_id of an earlier answer gives its
586
+ rates and rules again, as long as the engine has not changed. What withholds an
587
+ estimate today (an incident, an official notice not yet read, an exclusion from
588
+ importation) still applies: a saved estimate alone keeps its result.
578
589
  idempotency_key: Makes a retry of this call safe; a new one is generated for each
579
590
  call otherwise.
580
591
  """
@@ -619,8 +630,9 @@ class AsyncOperations:
619
630
  entry_type: A formal entry pays the merchandise processing fee (MPF) on its value.
620
631
  An informal entry pays a fixed fee the estimate does not calculate: it gives no
621
632
  fees.
622
- facts: Answers that hold for the whole declaration (GET /v2/facts, scope entry or
623
- shipment).
633
+ facts: Answers that hold for every line of the declaration, by name (GET /v2/facts):
634
+ a line's own answer comes first. Given here, mpf_exempt holds for the lines
635
+ entered under an agreement, and hmf_exempt for the declaration.
624
636
  freight: International freight in US dollars: no duty on it, it adds to the landed
625
637
  cost.
626
638
  include_fees: Count the entry fees (MPF, HMF) of the declaration.
@@ -628,8 +640,10 @@ class AsyncOperations:
628
640
  landed cost.
629
641
  label: A name for the saved estimate; needs save.
630
642
  publication_id: Calculate with this publication of the rules instead of the one in
631
- service on that date: the data.publication_id of an earlier answer gives the
632
- same result again, as long as the engine has not changed.
643
+ service on that date: the data.publication_id of an earlier answer gives its
644
+ rates and rules again, as long as the engine has not changed. What withholds an
645
+ estimate today (an incident, an official notice not yet read, an exclusion from
646
+ importation) still applies: a saved estimate alone keeps its result.
633
647
  reference: Your reference for the declaration.
634
648
  save: Save the estimate: only a saved estimate keeps its detail, is reported, and is
635
649
  notified if a rate proves wrong. An answer without a figure is not saved. Send
@@ -1,3 +1,3 @@
1
1
  """The package's version, the one in pyproject.toml."""
2
2
 
3
- __version__ = "0.3.0"
3
+ __version__ = "0.3.1"
@@ -87,8 +87,9 @@ class _LineInputRequired(TypedDict):
87
87
  class LineInput(_LineInputRequired, total=False):
88
88
  """One line of a declaration."""
89
89
  customs_value: int | float | Decimal | str | None
90
- """Customs value in US dollars: the transaction value declared, not a retail price. Unset:
91
- the duty rate is given, and an amount only where the duty does not depend on the value.
90
+ """Customs value in US dollars: the transaction value declared, not a retail price. A
91
+ declaration's line asks for it, the fees resting on it: without it, the line gives no
92
+ rate and no amount.
92
93
  """
93
94
  facts: Mapping[str, int | float | Decimal | str | bool]
94
95
  """Answers to the questions of the facts catalogue (GET /v2/facts), by name. A name that is
@@ -273,8 +274,9 @@ class AuditedEstimate(Model):
273
274
  """All the duties, in US dollars. Null is unknown, never zero."""
274
275
 
275
276
  estimated_duty_rate: str | None
276
- """The duties as a fraction of the customs value: 0.365 is 36.5%. Without a value, the sum
277
- of the rates; null when a duty is not a percentage, or while a duty is withheld.
277
+ """The duties as a fraction of the customs value: 0.365 is 36.5%. The sum of the rates when
278
+ each duty is a percentage, with or without a value; else the duties over the value, to 4
279
+ places, null without a value. Null while a duty is withheld.
278
280
  """
279
281
 
280
282
  estimated_fees: str | None
@@ -369,8 +371,9 @@ class AuditedLine(Model):
369
371
  """All the duties, in US dollars. Null is unknown, never zero."""
370
372
 
371
373
  estimated_duty_rate: str | None
372
- """The duties as a fraction of the customs value: 0.365 is 36.5%. Without a value, the sum
373
- of the rates; null when a duty is not a percentage, or while a duty is withheld.
374
+ """The duties as a fraction of the customs value: 0.365 is 36.5%. The sum of the rates when
375
+ each duty is a percentage, else the duties over the value, to 4 places. Null while a
376
+ duty is withheld.
374
377
  """
375
378
 
376
379
  facts: dict[str, Any] | None
@@ -680,8 +683,9 @@ class Estimate(Model):
680
683
  """All the duties, in US dollars. Null is unknown, never zero."""
681
684
 
682
685
  estimated_duty_rate: str | None
683
- """The duties as a fraction of the customs value: 0.365 is 36.5%. Without a value, the sum
684
- of the rates; null when a duty is not a percentage, or while a duty is withheld.
686
+ """The duties as a fraction of the customs value: 0.365 is 36.5%. The sum of the rates when
687
+ each duty is a percentage, with or without a value; else the duties over the value, to 4
688
+ places, null without a value. Null while a duty is withheld.
685
689
  """
686
690
 
687
691
  estimated_fees: str | None
@@ -781,7 +785,10 @@ class FactDefinition(Model):
781
785
  """For a choice: the values to choose from."""
782
786
 
783
787
  default: Any
784
- """The ordinary case, supposed when unanswered."""
788
+ """The ordinary case, supposed when unanswered. For an amount, "customs_value": the whole
789
+ customs value of the line; for a country, "origin": the origin of the line. Send a
790
+ value, never these names.
791
+ """
785
792
 
786
793
  help: str
787
794
  """What it means, and how to answer it."""
@@ -848,8 +855,9 @@ class HistoryPoint(Model):
848
855
  """All the duties, in US dollars. Null is unknown, never zero."""
849
856
 
850
857
  estimated_duty_rate: str | None
851
- """The duties as a fraction of the customs value: 0.365 is 36.5%. Without a value, the sum
852
- of the rates; null when a duty is not a percentage, or while a duty is withheld.
858
+ """The duties as a fraction of the customs value: 0.365 is 36.5%. The sum of the rates when
859
+ each duty is a percentage, with or without a value; else the duties over the value, to 4
860
+ places, null without a value. Null while a duty is withheld.
853
861
  """
854
862
 
855
863
  estimated_fees: str | None
@@ -1102,8 +1110,9 @@ class Line(Model):
1102
1110
  """All the duties, in US dollars. Null is unknown, never zero."""
1103
1111
 
1104
1112
  estimated_duty_rate: str | None
1105
- """The duties as a fraction of the customs value: 0.365 is 36.5%. Without a value, the sum
1106
- of the rates; null when a duty is not a percentage, or while a duty is withheld.
1113
+ """The duties as a fraction of the customs value: 0.365 is 36.5%. The sum of the rates when
1114
+ each duty is a percentage, else the duties over the value, to 4 places. Null while a
1115
+ duty is withheld.
1107
1116
  """
1108
1117
 
1109
1118
  facts: dict[str, Any] | None
@@ -456,7 +456,7 @@ wheels = [
456
456
 
457
457
  [[package]]
458
458
  name = "tarifftrust"
459
- version = "0.3.0"
459
+ version = "0.3.1"
460
460
  source = { editable = "." }
461
461
  dependencies = [
462
462
  { name = "httpx" },
File without changes
File without changes
File without changes