tango-python 1.15.0__py3-none-any.whl → 1.16.0__py3-none-any.whl

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.
tango/__init__.py CHANGED
@@ -62,7 +62,7 @@ from .webhooks import (
62
62
  )
63
63
  from .webhooks.receiver import Delivery, WebhookReceiver
64
64
 
65
- __version__ = "1.15.0"
65
+ __version__ = "1.16.0"
66
66
  __all__ = [
67
67
  "TangoClient",
68
68
  "TangoAPIError",
tango/models.py CHANGED
@@ -1365,6 +1365,10 @@ class EbuyAttachment:
1365
1365
  """Schema definition for one entry in an eBuy request's ``attachments`` (not used for instances).
1366
1366
 
1367
1367
  ``is_link=True`` means the entry is an outbound URL in ``doc_path`` with no stored document behind it, so ``get_ebuy_attachment_url()`` raises ``TangoAttachmentLinkError`` for it.
1368
+
1369
+ ``extracted_text`` (Tango API 5.9.1) is the text extracted from the attachment's document.
1370
+ It must be named, e.g. ``attachments(doc_seq_num,doc_name,extracted_text)``, because neither the default response nor ``attachments(*)`` includes it.
1371
+ An attachment with no text (a link, an empty scan, or a document not yet extracted) omits the key from the API response rather than returning null; the SDK's shaped result reads that as ``None``.
1368
1372
  """
1369
1373
 
1370
1374
  doc_seq_num: int | None = None
@@ -1373,6 +1377,7 @@ class EbuyAttachment:
1373
1377
  doc_path: str | None = None
1374
1378
  is_link: bool | None = None
1375
1379
  doc_session_date: datetime | None = None
1380
+ extracted_text: str | None = None
1376
1381
 
1377
1382
 
1378
1383
  class EbuyRequest:
@@ -1660,7 +1665,7 @@ class ShapeConfig:
1660
1665
  "link_count,last_seen"
1661
1666
  )
1662
1667
 
1663
- # Default for get_ebuy_request(). Mirrors the API's own retrieve default; the attachment fields are named rather than `attachments(*)` so their dates parse.
1668
+ # Default for get_ebuy_request(). Mirrors the API's own retrieve default; the attachment fields are named rather than `attachments(*)` so their dates parse. `extracted_text` is left out because document bodies are large and the API serves them only when named.
1664
1669
  EBUY_REQUESTS_COMPREHENSIVE: Final = (
1665
1670
  "rfq_id,request_type,title,description,schedule,sin,status,buyer_name,"
1666
1671
  "buyer_agency,buyer_agency_code,buyer_email,buyer_user_id,reference_number,"
@@ -886,6 +886,8 @@ EBUY_ATTACHMENT_SCHEMA: dict[str, FieldSchema] = {
886
886
  "doc_session_date": FieldSchema(
887
887
  name="doc_session_date", type=datetime, is_optional=True, is_list=False
888
888
  ),
889
+ # Only when named in the shape; the API omits the key for an attachment with no text.
890
+ "extracted_text": FieldSchema(name="extracted_text", type=str, is_optional=True, is_list=False),
889
891
  }
890
892
 
891
893
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tango-python
3
- Version: 1.15.0
3
+ Version: 1.16.0
4
4
  Summary: Python SDK for the Tango API
5
5
  Project-URL: Homepage, https://github.com/makegov/tango-python
6
6
  Project-URL: Documentation, https://docs.makegov.com/tango-python
@@ -1,9 +1,9 @@
1
- tango/__init__.py,sha256=UuWXzqRhKa6JLxJDbNyApeszFOGrskPWRTn_z6XykCM,2739
1
+ tango/__init__.py,sha256=_eYomSjLflugfMOs-MzscP6WX7UWlC63YvuwqX87PU4,2739
2
2
  tango/client.py,sha256=1Z748iPEPdVi8_Sq9XPES8RnPdnugEwL3yAgV7Cvvt0,243419
3
3
  tango/exceptions.py,sha256=oPiLCccBoWLK5SjHkzP-oI6mUD9twEeKSvEuLV5h01I,4224
4
- tango/models.py,sha256=M8HmbbnvrUcnHoPU7sJn2UtPu6h9UPzWAwQf53LEUAo,72006
4
+ tango/models.py,sha256=2kyX6ogMWVNfsBbh1ah5hUgWFH1EQuArwUCHzrHRY4Y,72598
5
5
  tango/shapes/__init__.py,sha256=7ea1WU74jp4znhNw-gXruag6m6eyPZtbVgbDFmFUWro,1072
6
- tango/shapes/explicit_schemas.py,sha256=tqGitlPoXN4VDfwCU5T4KfzLfQTyZ2Ephap56bDbB3c,84334
6
+ tango/shapes/explicit_schemas.py,sha256=RCsUOVKe89WYPORVSAPKWX6u3If1DdI_7a94VTAbzrI,84525
7
7
  tango/shapes/factory.py,sha256=uDPhnp6VVzrLBKodxteZy5AcU43juEv-qKVRWth51j0,31550
8
8
  tango/shapes/generated_overlay.py,sha256=7UwqTeqNW4NIuwsQlKVZgBlH2biEVBdEZ4z2IwiS1k4,141244
9
9
  tango/shapes/generator.py,sha256=xzakpwTwqTMUr89I06hp54-FIYZziviWHk2Glscg-LM,22775
@@ -16,8 +16,8 @@ tango/webhooks/cli.py,sha256=f_vQbJ2AeSQjKnQo7MxHFyUB2SAKcgHYmGQULS0isqQ,13858
16
16
  tango/webhooks/receiver.py,sha256=5yhsVhlLyoxmOCGvmbynWAIlDB2OaCPVf1H4GA1SxmU,9279
17
17
  tango/webhooks/signing.py,sha256=92Ee-0B6PR7ZkvY3Np3gzl88-mtfKkh-I7lxqCe2lGw,2374
18
18
  tango/webhooks/simulate.py,sha256=g2Osa0FYU5mJuon07T2aUCtmkUoTEzsY261tlp76fF0,3165
19
- tango_python-1.15.0.dist-info/METADATA,sha256=gCAx5F4Z_NnqK1CTR4uLgMcpwbKAiZZizruqonN8B_o,22824
20
- tango_python-1.15.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
21
- tango_python-1.15.0.dist-info/entry_points.txt,sha256=kGLUbglUjuaAqEFvOZ1QuSW0vWb6VeSpCIFKaOFkKoQ,50
22
- tango_python-1.15.0.dist-info/licenses/LICENSE,sha256=j2kYVHMwTkoGn3ZNScnrdIueG0k2XzB_LCPFoyBc2wk,1064
23
- tango_python-1.15.0.dist-info/RECORD,,
19
+ tango_python-1.16.0.dist-info/METADATA,sha256=cAmejqQdWIlO6x7flbQye3-EktIp4eN2Kjdyp4sqlyQ,22824
20
+ tango_python-1.16.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
21
+ tango_python-1.16.0.dist-info/entry_points.txt,sha256=kGLUbglUjuaAqEFvOZ1QuSW0vWb6VeSpCIFKaOFkKoQ,50
22
+ tango_python-1.16.0.dist-info/licenses/LICENSE,sha256=j2kYVHMwTkoGn3ZNScnrdIueG0k2XzB_LCPFoyBc2wk,1064
23
+ tango_python-1.16.0.dist-info/RECORD,,