tarifftrust 0.2.0__tar.gz → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tarifftrust
3
- Version: 0.2.0
3
+ Version: 0.3.0
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.2.0"
3
+ version = "0.3.0"
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"
@@ -107,7 +107,8 @@ class Operations:
107
107
  An informal entry pays a fixed fee the estimate does not calculate: it gives no
108
108
  fees.
109
109
  facts: Answers to the questions of the facts catalogue (GET /v2/facts), by name. A
110
- name outside the catalogue is said in warnings and never used.
110
+ name that is no question is refused, so that a typing error never gives a figure
111
+ on the ordinary case.
111
112
  freight: International freight in US dollars: no duty on it, it adds to the landed
112
113
  cost.
113
114
  include_fees: Count the entry fees (MPF, HMF) of a declaration of this product
@@ -282,7 +283,8 @@ class Operations:
282
283
  An informal entry pays a fixed fee the estimate does not calculate: it gives no
283
284
  fees.
284
285
  facts: Answers to the questions of the facts catalogue (GET /v2/facts), by name. A
285
- name outside the catalogue is said in warnings and never used.
286
+ name that is no question is refused, so that a typing error never gives a figure
287
+ on the ordinary case.
286
288
  freight: International freight in US dollars: no duty on it, it adds to the landed
287
289
  cost.
288
290
  from_: First day of the period. Unset: the first edition the service holds.
@@ -318,10 +320,10 @@ class Operations:
318
320
  ) -> FactList:
319
321
  """List the questions an estimate may ask.
320
322
 
321
- The facts catalogue: each question a measure may depend on, by the name to answer it
322
- with in facts, its type, its choices and its ordinary case. An answer names the ones it
323
- needs in missing, and those it rests on in facts. Needs the read permission; not
324
- counted.
323
+ The questions that can change an answer today: each by the name to answer it with in
324
+ facts, its type, its choices and its ordinary case. An answer names the ones it needs in
325
+ missing, and those it rests on in facts. The example shows two of them; the answer lists
326
+ them all. Needs the read permission; not counted.
325
327
  """
326
328
  return self._request(
327
329
  "GET",
@@ -510,7 +512,8 @@ class AsyncOperations:
510
512
  An informal entry pays a fixed fee the estimate does not calculate: it gives no
511
513
  fees.
512
514
  facts: Answers to the questions of the facts catalogue (GET /v2/facts), by name. A
513
- name outside the catalogue is said in warnings and never used.
515
+ name that is no question is refused, so that a typing error never gives a figure
516
+ on the ordinary case.
514
517
  freight: International freight in US dollars: no duty on it, it adds to the landed
515
518
  cost.
516
519
  include_fees: Count the entry fees (MPF, HMF) of a declaration of this product
@@ -685,7 +688,8 @@ class AsyncOperations:
685
688
  An informal entry pays a fixed fee the estimate does not calculate: it gives no
686
689
  fees.
687
690
  facts: Answers to the questions of the facts catalogue (GET /v2/facts), by name. A
688
- name outside the catalogue is said in warnings and never used.
691
+ name that is no question is refused, so that a typing error never gives a figure
692
+ on the ordinary case.
689
693
  freight: International freight in US dollars: no duty on it, it adds to the landed
690
694
  cost.
691
695
  from_: First day of the period. Unset: the first edition the service holds.
@@ -721,10 +725,10 @@ class AsyncOperations:
721
725
  ) -> FactList:
722
726
  """List the questions an estimate may ask.
723
727
 
724
- The facts catalogue: each question a measure may depend on, by the name to answer it
725
- with in facts, its type, its choices and its ordinary case. An answer names the ones it
726
- needs in missing, and those it rests on in facts. Needs the read permission; not
727
- counted.
728
+ The questions that can change an answer today: each by the name to answer it with in
729
+ facts, its type, its choices and its ordinary case. An answer names the ones it needs in
730
+ missing, and those it rests on in facts. The example shows two of them; the answer lists
731
+ them all. Needs the read permission; not counted.
728
732
  """
729
733
  return await self._request(
730
734
  "GET",
@@ -1,3 +1,3 @@
1
1
  """The package's version, the one in pyproject.toml."""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.3.0"
@@ -38,8 +38,9 @@ class BatchItem(_BatchItemRequired, total=False):
38
38
  pays a fixed fee the estimate does not calculate: it gives no fees.
39
39
  """
40
40
  facts: Mapping[str, int | float | Decimal | str | bool]
41
- """Answers to the questions of the facts catalogue (GET /v2/facts), by name. A name outside
42
- the catalogue is said in warnings and never used.
41
+ """Answers to the questions of the facts catalogue (GET /v2/facts), by name. A name that is
42
+ no question is refused, so that a typing error never gives a figure on the ordinary
43
+ case.
43
44
  """
44
45
  freight: int | float | Decimal | str
45
46
  """International freight in US dollars: no duty on it, it adds to the landed cost."""
@@ -90,8 +91,9 @@ class LineInput(_LineInputRequired, total=False):
90
91
  the duty rate is given, and an amount only where the duty does not depend on the value.
91
92
  """
92
93
  facts: Mapping[str, int | float | Decimal | str | bool]
93
- """Answers to the questions of the facts catalogue (GET /v2/facts), by name. A name outside
94
- the catalogue is said in warnings and never used.
94
+ """Answers to the questions of the facts catalogue (GET /v2/facts), by name. A name that is
95
+ no question is refused, so that a typing error never gives a figure on the ordinary
96
+ case.
95
97
  """
96
98
  preference: str | None
97
99
  """A trade agreement's symbol from the HTS special column (S for USMCA, KR for KORUS…; GET
@@ -142,6 +144,24 @@ class AgreementList(Model):
142
144
  """Where the tariff that names them is published."""
143
145
 
144
146
 
147
+ class AskedBy(Model):
148
+ """An official text that asks a question: read it to answer precisely."""
149
+
150
+ _fields: ClassVar[frozenset[str]] = frozenset(['heading', 'title', 'url'])
151
+ _required: ClassVar[frozenset[str]] = frozenset(['heading', 'title', 'url'])
152
+
153
+ heading: str | None
154
+ """The Chapter 99 heading, or the tariff line, whose text asks it; null for a regulation."""
155
+
156
+ title: str
157
+ """What it is, in words."""
158
+
159
+ url: str
160
+ """Where to read it: the heading's page, with its text and the note it cites, or the
161
+ official document of a notice read ahead of the tariff.
162
+ """
163
+
164
+
145
165
  class AuditedDeclaration(Model):
146
166
  """A saved declaration's answer, with the detail behind it."""
147
167
 
@@ -746,10 +766,16 @@ class FactChoice(Model):
746
766
  class FactDefinition(Model):
747
767
  """A question an estimate may ask about the goods or the declaration."""
748
768
 
749
- _fields: ClassVar[frozenset[str]] = frozenset(['choices', 'default', 'help', 'name', 'question', 'scope', 'type', 'unit'])
769
+ _fields: ClassVar[frozenset[str]] = frozenset(['asked_by', 'choices', 'default', 'help', 'name', 'question', 'scope', 'type', 'unit'])
750
770
  _required: ClassVar[frozenset[str]] = frozenset(['help', 'name', 'question', 'scope', 'type'])
751
- _nested: ClassVar[dict[str, Any]] = {'choices': ['FactChoice']}
752
- _defaults: ClassVar[dict[str, Any]] = {'choices': [], 'unit': ''}
771
+ _nested: ClassVar[dict[str, Any]] = {'asked_by': ['AskedBy'], 'choices': ['FactChoice']}
772
+ _defaults: ClassVar[dict[str, Any]] = {'asked_by': [], 'choices': [], 'unit': ''}
773
+
774
+ asked_by: list[AskedBy]
775
+ """The official texts that ask it today: the headings whose rules in service read it, or
776
+ the regulation of a fee. Empty for what depends on each product's own line (its rate,
777
+ its entry); an estimate names, in missing, those that ask it for its goods.
778
+ """
753
779
 
754
780
  choices: list[FactChoice]
755
781
  """For a choice: the values to choose from."""
@@ -773,7 +799,7 @@ class FactDefinition(Model):
773
799
 
774
800
  type: str
775
801
  """How it is answered: boolean (true or false), choice (one of choices), money (US
776
- dollars), number, country (ISO code) or heading (a Chapter 99 heading).
802
+ dollars), number or country (ISO code).
777
803
  """
778
804
 
779
805
  unit: str
@@ -781,14 +807,14 @@ class FactDefinition(Model):
781
807
 
782
808
 
783
809
  class FactList(Model):
784
- """The facts catalogue: every question an estimate may ask."""
810
+ """The questions an estimate may ask."""
785
811
 
786
812
  _fields: ClassVar[frozenset[str]] = frozenset(['facts'])
787
813
  _required: ClassVar[frozenset[str]] = frozenset(['facts'])
788
814
  _nested: ClassVar[dict[str, Any]] = {'facts': ['FactDefinition']}
789
815
 
790
816
  facts: list[FactDefinition]
791
- """Every question of the catalogue."""
817
+ """The questions that can change an answer today."""
792
818
 
793
819
 
794
820
  class HistoryPoint(Model):
@@ -1122,8 +1148,12 @@ class Line(Model):
1122
1148
  class MissingField(Model):
1123
1149
  """What the service needs to give a figure."""
1124
1150
 
1125
- _fields: ClassVar[frozenset[str]] = frozenset(['choices', 'field', 'question', 'type', 'unit'])
1151
+ _fields: ClassVar[frozenset[str]] = frozenset(['asked_by', 'choices', 'field', 'question', 'type', 'unit'])
1126
1152
  _required: ClassVar[frozenset[str]] = frozenset(['field', 'question', 'type'])
1153
+ _nested: ClassVar[dict[str, Any]] = {'asked_by': ['AskedBy']}
1154
+
1155
+ asked_by: list[AskedBy] | None
1156
+ """The official texts that ask it for these goods, to answer it precisely."""
1127
1157
 
1128
1158
  choices: list[Any] | None
1129
1159
  """The values a choice takes."""
@@ -1135,9 +1165,7 @@ class MissingField(Model):
1135
1165
  """What it asks, in words."""
1136
1166
 
1137
1167
  type: str
1138
- """The type of its value: number, money, boolean, choice, text, heading, country or
1139
- datetime.
1140
- """
1168
+ """The type of its value: number, money, boolean, choice, text, country or datetime."""
1141
1169
 
1142
1170
  unit: str | None
1143
1171
  """The unit of a quantity."""
@@ -456,7 +456,7 @@ wheels = [
456
456
 
457
457
  [[package]]
458
458
  name = "tarifftrust"
459
- version = "0.2.0"
459
+ version = "0.3.0"
460
460
  source = { editable = "." }
461
461
  dependencies = [
462
462
  { name = "httpx" },
File without changes
File without changes
File without changes