tango-python 1.15.0__tar.gz → 1.17.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.
Files changed (208) hide show
  1. {tango_python-1.15.0 → tango_python-1.17.0}/CHANGELOG.md +20 -0
  2. {tango_python-1.15.0 → tango_python-1.17.0}/PKG-INFO +1 -1
  3. {tango_python-1.15.0 → tango_python-1.17.0}/docs/API_REFERENCE.md +24 -2
  4. {tango_python-1.15.0 → tango_python-1.17.0}/pyproject.toml +1 -1
  5. {tango_python-1.15.0 → tango_python-1.17.0}/tango/__init__.py +1 -1
  6. {tango_python-1.15.0 → tango_python-1.17.0}/tango/client.py +7 -0
  7. {tango_python-1.15.0 → tango_python-1.17.0}/tango/models.py +6 -1
  8. {tango_python-1.15.0 → tango_python-1.17.0}/tango/shapes/explicit_schemas.py +2 -0
  9. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_client.py +27 -0
  10. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_ebuy.py +30 -0
  11. {tango_python-1.15.0 → tango_python-1.17.0}/.gitignore +0 -0
  12. {tango_python-1.15.0 → tango_python-1.17.0}/LICENSE +0 -0
  13. {tango_python-1.15.0 → tango_python-1.17.0}/README.md +0 -0
  14. {tango_python-1.15.0 → tango_python-1.17.0}/docs/CLIENT.md +0 -0
  15. {tango_python-1.15.0 → tango_python-1.17.0}/docs/DYNAMIC_MODELS.md +0 -0
  16. {tango_python-1.15.0 → tango_python-1.17.0}/docs/ERRORS.md +0 -0
  17. {tango_python-1.15.0 → tango_python-1.17.0}/docs/PAGINATION.md +0 -0
  18. {tango_python-1.15.0 → tango_python-1.17.0}/docs/SHAPES.md +0 -0
  19. {tango_python-1.15.0 → tango_python-1.17.0}/docs/WEBHOOKS.md +0 -0
  20. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/README.md +0 -0
  21. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/check_filter_shape_conformance.py +0 -0
  22. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/check_shape_coverage.py +0 -0
  23. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/fetch_api_schema.py +0 -0
  24. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/generate_schemas_from_api.py +0 -0
  25. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/generate_shape_overlay.py +0 -0
  26. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/pr_review.py +0 -0
  27. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/probe_shape_types.py +0 -0
  28. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/refresh_contract.py +0 -0
  29. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/smoke_api_parity.py +0 -0
  30. {tango_python-1.15.0 → tango_python-1.17.0}/scripts/test_production.py +0 -0
  31. {tango_python-1.15.0 → tango_python-1.17.0}/tango/exceptions.py +0 -0
  32. {tango_python-1.15.0 → tango_python-1.17.0}/tango/shapes/__init__.py +0 -0
  33. {tango_python-1.15.0 → tango_python-1.17.0}/tango/shapes/factory.py +0 -0
  34. {tango_python-1.15.0 → tango_python-1.17.0}/tango/shapes/generated_overlay.py +0 -0
  35. {tango_python-1.15.0 → tango_python-1.17.0}/tango/shapes/generator.py +0 -0
  36. {tango_python-1.15.0 → tango_python-1.17.0}/tango/shapes/models.py +0 -0
  37. {tango_python-1.15.0 → tango_python-1.17.0}/tango/shapes/parser.py +0 -0
  38. {tango_python-1.15.0 → tango_python-1.17.0}/tango/shapes/schema.py +0 -0
  39. {tango_python-1.15.0 → tango_python-1.17.0}/tango/shapes/types.py +0 -0
  40. {tango_python-1.15.0 → tango_python-1.17.0}/tango/webhooks/__init__.py +0 -0
  41. {tango_python-1.15.0 → tango_python-1.17.0}/tango/webhooks/cli.py +0 -0
  42. {tango_python-1.15.0 → tango_python-1.17.0}/tango/webhooks/receiver.py +0 -0
  43. {tango_python-1.15.0 → tango_python-1.17.0}/tango/webhooks/signing.py +0 -0
  44. {tango_python-1.15.0 → tango_python-1.17.0}/tango/webhooks/simulate.py +0 -0
  45. {tango_python-1.15.0 → tango_python-1.17.0}/tests/__init__.py +0 -0
  46. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestAgenciesIntegration.test_get_agency +0 -0
  47. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestAgenciesIntegration.test_list_agencies +0 -0
  48. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestBusinessTypesIntegration.test_business_type_field_type_validation +0 -0
  49. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestBusinessTypesIntegration.test_business_type_parsing_consistency +0 -0
  50. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestBusinessTypesIntegration.test_list_business_types +0 -0
  51. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_combined_filters_work_together +0 -0
  52. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_contract_cursor_pagination +0 -0
  53. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_contract_data_object_parsing +0 -0
  54. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_contract_field_types +0 -0
  55. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[keyword-software] +0 -0
  56. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[psc_code-R425] +0 -0
  57. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_list_contracts_with_awarding_agency_filter +0 -0
  58. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_list_contracts_with_date_range_filter +0 -0
  59. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_list_contracts_with_flat +0 -0
  60. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_list_contracts_with_naics_code_filter +0 -0
  61. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[custom-key,piid,recipient(display_name),total_contract_value,award_date] +0 -0
  62. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[default-None] +0 -0
  63. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[detailed-key,piid,award_date,description,total_contract_value,obligated,fiscal_year,set_aside,recipient(display_name,uei),awarding_office(-),place_of_performa...ce114a3c47e2037aaa3c15d00b7031bd +0 -0
  64. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] +0 -0
  65. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_new_expiring_filters +0 -0
  66. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_new_fiscal_year_range_filters +0 -0
  67. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_new_identifier_filters +0 -0
  68. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_search_contracts_with_filters +0 -0
  69. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_search_filters_object_with_new_parameters +0 -0
  70. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[asc-] +0 -0
  71. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[desc--] +0 -0
  72. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_api_schema_stability_detection_contracts +0 -0
  73. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_api_schema_stability_detection_entities +0 -0
  74. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_date_field_parsing_edge_cases +0 -0
  75. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_decimal_field_parsing_edge_cases +0 -0
  76. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_empty_list_responses +0 -0
  77. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_entity_parsing_with_various_address_formats +0 -0
  78. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_flattened_responses_with_flat_lists +0 -0
  79. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_list_field_parsing_consistency +0 -0
  80. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_parsing_nested_objects_with_missing_data +0 -0
  81. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_parsing_null_missing_fields_in_contracts +0 -0
  82. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEdgeCasesIntegration.test_parsing_with_minimal_shape_sparse_data +0 -0
  83. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_entity_field_types +0 -0
  84. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_entity_location_parsing +0 -0
  85. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_entity_parsing_with_business_types +0 -0
  86. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_entity_with_various_identifiers +0 -0
  87. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_get_entity_budget_flows +0 -0
  88. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_get_entity_by_uei +0 -0
  89. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_list_entities_with_flat +0 -0
  90. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_list_entities_with_search +0 -0
  91. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_list_entities_with_shapes[comprehensive-uei,legal_business_name,dba_name,cage_code,business_types,primary_naics,naics_codes,psc_codes,email_address,entity_url,description,capabilities,ke...1603a7d52e211cf2b3bc7d32080238aa +0 -0
  92. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_list_entities_with_shapes[custom-uei,legal_business_name,cage_code] +0 -0
  93. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_list_entities_with_shapes[minimal-uei,legal_business_name,cage_code,business_types] +0 -0
  94. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestEntitiesIntegration.test_list_entities_with_shapes[with_address-uei,legal_business_name,cage_code,business_types,physical_address] +0 -0
  95. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestForecastsIntegration.test_forecast_field_types +0 -0
  96. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestForecastsIntegration.test_list_forecasts_with_shapes[custom-id,title,anticipated_award_date] +0 -0
  97. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestForecastsIntegration.test_list_forecasts_with_shapes[default-None] +0 -0
  98. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestForecastsIntegration.test_list_forecasts_with_shapes[detailed-id,source_system,external_id,title,description,anticipated_award_date,fiscal_year,naics_code,status,is_active] +0 -0
  99. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestForecastsIntegration.test_list_forecasts_with_shapes[minimal-id,title,anticipated_award_date,fiscal_year,naics_code,status] +0 -0
  100. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestGrantsIntegration.test_grant_field_types +0 -0
  101. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestGrantsIntegration.test_grant_pagination +0 -0
  102. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestGrantsIntegration.test_list_grants_with_shapes[custom-grant_id,title,opportunity_number] +0 -0
  103. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestGrantsIntegration.test_list_grants_with_shapes[default-None] +0 -0
  104. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestGrantsIntegration.test_list_grants_with_shapes[detailed-grant_id,opportunity_number,title,status(-),agency_code,description,last_updated,cfda_numbers(number,title),applicant_types(-),funding_categories(-)] +0 -0
  105. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestGrantsIntegration.test_list_grants_with_shapes[minimal-grant_id,opportunity_number,title,status(-),agency_code] +0 -0
  106. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestIDVsIntegration.test_get_idv_uses_default_shape +0 -0
  107. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestIDVsIntegration.test_list_idv_awards_uses_default_shape +0 -0
  108. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestIDVsIntegration.test_list_idv_child_idvs_uses_default_shape +0 -0
  109. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestIDVsIntegration.test_list_idv_transactions +0 -0
  110. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestIDVsIntegration.test_list_idvs_uses_default_shape_and_keyset_params +0 -0
  111. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_filter_by_agency_code +0 -0
  112. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_filter_by_agency_name_text +0 -0
  113. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_filter_by_cio_rating +0 -0
  114. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_filter_by_cio_rating_max +0 -0
  115. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_filter_by_performance_risk +0 -0
  116. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_filter_by_type_of_investment +0 -0
  117. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_filter_by_updated_time_range +0 -0
  118. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_funding_and_cio_evaluation_expansions +0 -0
  119. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_get_itdashboard_investment_by_uii +0 -0
  120. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_itdashboard_pagination +0 -0
  121. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_list_itdashboard_investments_with_search +0 -0
  122. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_list_itdashboard_investments_with_shapes[custom-uii,agency_name,investment_title,updated_time] +0 -0
  123. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_list_itdashboard_investments_with_shapes[default-None] +0 -0
  124. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestITDashboardIntegration.test_list_itdashboard_investments_with_shapes[minimal-uii,agency_name,bureau_name,investment_title,type_of_investment,part_of_it_portfolio,updated_time,url] +0 -0
  125. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestNaicsIntegration.test_list_naics +0 -0
  126. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestNoticesIntegration.test_list_notices_with_shapes[custom-notice_id,title,solicitation_number] +0 -0
  127. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestNoticesIntegration.test_list_notices_with_shapes[default-None] +0 -0
  128. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestNoticesIntegration.test_list_notices_with_shapes[detailed-notice_id,title,description,solicitation_number,posted_date,naics_code,set_aside,office(-),place_of_performance(-)] +0 -0
  129. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestNoticesIntegration.test_list_notices_with_shapes[minimal-notice_id,title,solicitation_number,posted_date] +0 -0
  130. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestNoticesIntegration.test_notice_field_types +0 -0
  131. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestNoticesIntegration.test_notice_pagination +0 -0
  132. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestNoticesIntegration.test_notice_with_meta_fields +0 -0
  133. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOTAsIntegration.test_get_ota +0 -0
  134. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOTAsIntegration.test_list_otas +0 -0
  135. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOTIDVsIntegration.test_get_otidv +0 -0
  136. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOTIDVsIntegration.test_list_otidvs +0 -0
  137. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOfficesIntegration.test_get_office +0 -0
  138. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOfficesIntegration.test_list_offices +0 -0
  139. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOpportunitiesIntegration.test_list_opportunities_with_shapes[custom-opportunity_id,title,solicitation_number] +0 -0
  140. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOpportunitiesIntegration.test_list_opportunities_with_shapes[default-None] +0 -0
  141. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOpportunitiesIntegration.test_list_opportunities_with_shapes[detailed-opportunity_id,title,description,solicitation_number,response_deadline,first_notice_date,last_notice_date,active,naics_code,psc_code,set_asid...23b6b4502ddd665b7184afcff6c6d8d9 +0 -0
  142. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOpportunitiesIntegration.test_list_opportunities_with_shapes[minimal-opportunity_id,title,solicitation_number,response_deadline,active] +0 -0
  143. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOpportunitiesIntegration.test_opportunity_field_types +0 -0
  144. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOrganizationsIntegration.test_get_organization +0 -0
  145. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestOrganizationsIntegration.test_list_organizations +0 -0
  146. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestProtestsIntegration.test_get_protest_by_case_id +0 -0
  147. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestProtestsIntegration.test_list_protests_with_filter +0 -0
  148. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestProtestsIntegration.test_list_protests_with_shapes[custom-case_id,title,source_system,outcome] +0 -0
  149. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestProtestsIntegration.test_list_protests_with_shapes[default-None] +0 -0
  150. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestProtestsIntegration.test_list_protests_with_shapes[minimal-case_id,case_number,title,source_system,outcome,filed_date] +0 -0
  151. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestProtestsIntegration.test_list_protests_with_shapes[with_dockets-case_id,case_number,title,outcome,filed_date,dockets(docket_number,filed_date,outcome)] +0 -0
  152. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestProtestsIntegration.test_protest_pagination +0 -0
  153. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestSubawardsIntegration.test_list_subawards +0 -0
  154. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[custom-key,piid,description] +0 -0
  155. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] +0 -0
  156. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[ultra_minimal-key,piid,recipient(display_name),total_contract_value] +0 -0
  157. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestTypeHintsIntegration.test_entities_dict_access[minimal-uei,legal_business_name,cage_code,business_types] +0 -0
  158. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestTypeHintsIntegration.test_entities_dict_access[with_address-uei,legal_business_name,cage_code,business_types,physical_address] +0 -0
  159. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestTypeHintsIntegration.test_notices_dict_access[detailed-notice_id,title,description,solicitation_number,posted_date,naics_code,set_aside,office(-),place_of_performance(-)] +0 -0
  160. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestTypeHintsIntegration.test_notices_dict_access[minimal-notice_id,title,solicitation_number,posted_date] +0 -0
  161. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestTypeHintsIntegration.test_opportunities_dict_access[detailed-opportunity_id,title,description,solicitation_number,response_deadline,first_notice_date,last_notice_date,active,naics_code,psc_code,set_aside,sam_url,office(-),place_of_performance(-)] +0 -0
  162. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestTypeHintsIntegration.test_opportunities_dict_access[minimal-opportunity_id,title,solicitation_number,response_deadline,active] +0 -0
  163. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestVehiclesIntegration.test_get_vehicle_supports_joiner_and_flat_lists +0 -0
  164. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestVehiclesIntegration.test_get_vehicle_with_metrics_expansion +0 -0
  165. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestVehiclesIntegration.test_list_vehicle_awardees_uses_default_shape +0 -0
  166. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestVehiclesIntegration.test_list_vehicle_orders_uses_default_shape +0 -0
  167. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestVehiclesIntegration.test_list_vehicles_uses_default_shape_and_search +0 -0
  168. {tango_python-1.15.0 → tango_python-1.17.0}/tests/cassettes/TestVehiclesIntegration.test_list_vehicles_with_ordering +0 -0
  169. {tango_python-1.15.0 → tango_python-1.17.0}/tests/conftest.py +0 -0
  170. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/README.md +0 -0
  171. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/__init__.py +0 -0
  172. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/conftest.py +0 -0
  173. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_agencies_integration.py +0 -0
  174. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_contracts_integration.py +0 -0
  175. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_edge_cases_integration.py +0 -0
  176. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_entities_integration.py +0 -0
  177. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_forecasts_integration.py +0 -0
  178. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_grants_integration.py +0 -0
  179. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_itdashboard_integration.py +0 -0
  180. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_naics_integration.py +0 -0
  181. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_notices_integration.py +0 -0
  182. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_offices_integration.py +0 -0
  183. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_opportunities_integration.py +0 -0
  184. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_organizations_integration.py +0 -0
  185. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_otas_otidvs_integration.py +0 -0
  186. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_protests_integration.py +0 -0
  187. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_reference_data_integration.py +0 -0
  188. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_subawards_integration.py +0 -0
  189. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/test_vehicles_idvs_integration.py +0 -0
  190. {tango_python-1.15.0 → tango_python-1.17.0}/tests/integration/validation.py +0 -0
  191. {tango_python-1.15.0 → tango_python-1.17.0}/tests/production/__init__.py +0 -0
  192. {tango_python-1.15.0 → tango_python-1.17.0}/tests/production/conftest.py +0 -0
  193. {tango_python-1.15.0 → tango_python-1.17.0}/tests/production/test_production_smoke.py +0 -0
  194. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_api_parity.py +0 -0
  195. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_contract_appeals.py +0 -0
  196. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_dibbs_exclusions_sbir.py +0 -0
  197. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_federal_register.py +0 -0
  198. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_models.py +0 -0
  199. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_opportunity_attachments.py +0 -0
  200. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_opportunity_awards.py +0 -0
  201. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_organization_scope.py +0 -0
  202. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_shape_coverage_gate.py +0 -0
  203. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_shapes.py +0 -0
  204. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_sled.py +0 -0
  205. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_webhooks_cli.py +0 -0
  206. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_webhooks_receiver.py +0 -0
  207. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_webhooks_signing.py +0 -0
  208. {tango_python-1.15.0 → tango_python-1.17.0}/tests/test_webhooks_simulate.py +0 -0
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.17.0] - 2026-10-16
11
+
12
+ ### Added
13
+
14
+ - **`commercial_item_acquisition_procedures` filter on `list_contracts()` and `list_idvs()`** (Tango API 5.10.0). Filters by the FPDS commercial item acquisition procedures code: `A` (commercial products/services), `B` (products or services pursuant to FAR 12.102(f)), `C` (services pursuant to FAR 12.102(g)), `D` (commercial procedures not used) or `E` (DoD Section 803 Commercial Solutions Opening). Codes are case-insensitive and pipe-separated for OR, e.g. `"A|E"`; an unknown or multi-character code matches nothing. The API does not offer it on OTAs or OTIDVs, so `list_otas()` and `list_otidvs()` do not take it. The field itself was already returned in responses.
15
+
16
+ ### Changed
17
+
18
+ - Re-vendored `contracts/filter_shape_contract.json` (Tango API 5.10.0).
19
+
20
+ ## [1.16.0] - 2026-10-10
21
+
22
+ ### Added
23
+
24
+ - **Extracted text on eBuy request attachments** (Tango API 5.9.1). `attachments(extracted_text)` on eBuy requests returns the text extracted from an attachment's document. It is returned only when named: the default `get_ebuy_request()` shape and `attachments(*)` leave it out. An attachment with no text (an external link, an empty scan, or a document not yet extracted) is sent by the API without the key rather than with a null; the SDK's shaped result reads that as `None`.
25
+
26
+ ### Changed
27
+
28
+ - Re-vendored `contracts/filter_shape_contract.json` (Tango API 5.9.1).
29
+
10
30
  ## [1.15.0] - 2026-10-06
11
31
 
12
32
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tango-python
3
- Version: 1.15.0
3
+ Version: 1.17.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
@@ -244,6 +244,7 @@ contracts = client.list_contracts(
244
244
  naics_code=None, # Mapped to 'naics' API param
245
245
  psc_code=None, # Mapped to 'psc' API param
246
246
  set_aside_type=None, # Mapped to 'set_aside' API param
247
+ commercial_item_acquisition_procedures=None, # FPDS code A-E, e.g. "A|E"
247
248
  # Type filters
248
249
  fiscal_year=None,
249
250
  fiscal_year_gte=None,
@@ -290,6 +291,7 @@ contracts = client.list_contracts(
290
291
  - `naics_code` - NAICS industry code (mapped to 'naics' API param)
291
292
  - `psc_code` - Product/Service code (mapped to 'psc' API param)
292
293
  - `set_aside_type` - Set-aside type (mapped to 'set_aside' API param)
294
+ - `commercial_item_acquisition_procedures` - FPDS commercial item acquisition procedures code, case-insensitive: `A` (commercial products/services), `B` (products or services pursuant to FAR 12.102(f)), `C` (services pursuant to FAR 12.102(g)), `D` (commercial procedures not used) or `E` (DoD Section 803 Commercial Solutions Opening). Multi-value OR via `|`, e.g. `"A|E"`. An unknown or multi-character code matches nothing.
293
295
 
294
296
  **Type Filters:**
295
297
  - `fiscal_year` - Federal fiscal year (exact match)
@@ -420,7 +422,7 @@ otas = client.list_otas(
420
422
 
421
423
  **Notes:**
422
424
  - Uses **keyset pagination** (`cursor` + `limit`) rather than page numbers.
423
- - Filter parameters mirror those on `list_contracts`.
425
+ - Filter parameters mirror those on `list_contracts`, except `commercial_item_acquisition_procedures`, which the API does not offer on OTAs or OTIDVs.
424
426
 
425
427
  **Returns:** [PaginatedResponse](#paginatedresponse) with OTA dictionaries
426
428
 
@@ -638,12 +640,14 @@ idvs = client.list_idvs(
638
640
  cursor=None,
639
641
  shape=ShapeConfig.IDVS_MINIMAL,
640
642
  awarding_agency="4700",
643
+ commercial_item_acquisition_procedures="E", # DoD Section 803 CSO
641
644
  )
642
645
  ```
643
646
 
644
647
  Notes:
645
648
 
646
649
  - This endpoint uses **keyset pagination** (`cursor` + `limit`) rather than page numbers.
650
+ - `commercial_item_acquisition_procedures` takes the same FPDS codes `A`–`E` as on `list_contracts()`, with `|` for OR.
647
651
 
648
652
  ### get_idv()
649
653
 
@@ -1758,6 +1762,24 @@ for attachment in request["attachments"]:
1758
1762
 
1759
1763
  The default shape returns every field plus two expands: `organization` (the buyer office, with the same seven keys as other resources' `organization` expand) and `attachments`. Each attachment carries `doc_seq_num`, `doc_name`, `doc_type`, `doc_path`, `is_link` and `doc_session_date`. `is_link=True` means `doc_path` is an outbound URL with no stored document behind it. `amendments`, `line_items` and `addresses` are lists of objects, served as eBuy publishes them.
1760
1764
 
1765
+ **Reading a document's text — `attachments(extracted_text)`** (Tango API 5.9.1):
1766
+
1767
+ ```python
1768
+ request = client.get_ebuy_request(
1769
+ "RFQ1835158",
1770
+ shape="rfq_id,attachments(doc_seq_num,doc_name,extracted_text)",
1771
+ )
1772
+
1773
+ for attachment in request["attachments"]:
1774
+ text = attachment.get("extracted_text")
1775
+ if text:
1776
+ print(attachment["doc_name"], len(text))
1777
+ ```
1778
+
1779
+ - `extracted_text` is the text extracted from the attachment's document.
1780
+ - **It is returned only when you name it.** The default shape does not include it, and neither does `attachments(*)`.
1781
+ - **The API omits the key, rather than sending null**, for an attachment with no text: an external link, an empty scan, or a document that has not been extracted yet. The SDK's shaped result reads an omitted key as `None`, so treat `None` as "no text", not as an error.
1782
+
1761
1783
  ### get_ebuy_attachment_url()
1762
1784
 
1763
1785
  Get a short-lived download URL for one stored attachment.
@@ -2606,7 +2628,7 @@ entity = client.get_entity("UEI_KEY", shape=ShapeConfig.ENTITIES_COMPREHENSIVE)
2606
2628
  | `FEDERAL_REGISTER_MINIMAL` | `list_federal_register_documents` | uuid, document_number, publication_date, type, subtype, title, abstract, action, agencies, cfr_references, citation, significant, comments_close_on, effective_on, html_url, pdf_url |
2607
2629
  | `FEDERAL_REGISTER_COMPREHENSIVE` | `get_federal_register_document` | The list fields plus dates, signing_date, start_page, end_page, volume, docket_ids, dockets, regulation_id_numbers, topics, correction_of, corrections, executive_order_number, presidential_document_number, proclamation_number, comment_url, regulations_dot_gov_url, raw_text_url, body_html_url (omits `full_text`) |
2608
2630
  | `EBUY_REQUESTS_MINIMAL` | `list_ebuy_requests` | rfq_id, request_type, title, schedule, sin, status, buyer_name, buyer_agency, buyer_agency_code, reference_number, issue_date, close_date, attachment_count, link_count, last_seen |
2609
- | `EBUY_REQUESTS_COMPREHENSIVE` | `get_ebuy_request` | Every field, plus the `organization` and `attachments` expands |
2631
+ | `EBUY_REQUESTS_COMPREHENSIVE` | `get_ebuy_request` | Every field, plus the `organization` and `attachments` expands (without `extracted_text`, which must be named) |
2610
2632
  | `BUDGET_ACCOUNTS_MINIMAL` | `list_budget_accounts`, `get_budget_account` | id, federal_account_symbol, fiscal_year, data_through_period, agency_code/name, bureau_name, account_title, bea_category, on_off_budget, subfunction_code, account_category, lifecycle (requested/enacted/apportioned/obligated/outlayed/unobligated), contract & assistance rollups, key ratios, next-year growth, source_anomalies |
2611
2633
  | `VEHICLE_ORDERS_MINIMAL` | `list_vehicle_orders` | key, piid, award_date, recipient(display_name,uei), total_contract_value, obligated |
2612
2634
  | `ITDASHBOARD_INVESTMENTS_MINIMAL` | `list_itdashboard_investments` | Minimal IT Dashboard investment fields |
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tango-python"
7
- version = "1.15.0"
7
+ version = "1.17.0"
8
8
  description = "Python SDK for the Tango API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -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.17.0"
66
66
  __all__ = [
67
67
  "TangoClient",
68
68
  "TangoAPIError",
@@ -632,6 +632,7 @@ class TangoClient:
632
632
  award_date_lte: str | None = None,
633
633
  award_type: str | None = None,
634
634
  awarding_agency: str | None = None,
635
+ commercial_item_acquisition_procedures: str | None = None,
635
636
  expiring_gte: str | None = None,
636
637
  expiring_lte: str | None = None,
637
638
  fiscal_year: int | None = None,
@@ -674,6 +675,7 @@ class TangoClient:
674
675
  award_date_lte: Award date <= (YYYY-MM-DD)
675
676
  award_type: Award type code
676
677
  awarding_agency: Awarding agency code (e.g., "4700" for GSA)
678
+ commercial_item_acquisition_procedures: FPDS commercial item acquisition procedures code, case-insensitive: "A" (commercial products/services), "B" (products or services pursuant to FAR 12.102(f)), "C" (services pursuant to FAR 12.102(g)), "D" (commercial procedures not used) or "E" (DoD Section 803 Commercial Solutions Opening). Pipe-separate codes for OR, e.g. "A|E"; an unknown code matches nothing.
677
679
  expiring_gte: Expiring on or after date
678
680
  expiring_lte: Expiring on or before date
679
681
  fiscal_year: Fiscal year (exact match)
@@ -751,6 +753,7 @@ class TangoClient:
751
753
  ("award_date_lte", award_date_lte),
752
754
  ("award_type", award_type),
753
755
  ("awarding_agency", awarding_agency),
756
+ ("commercial_item_acquisition_procedures", commercial_item_acquisition_procedures),
754
757
  ("expiring_gte", expiring_gte),
755
758
  ("expiring_lte", expiring_lte),
756
759
  ("fiscal_year", fiscal_year),
@@ -915,6 +918,7 @@ class TangoClient:
915
918
  award_date_gte: str | None = None,
916
919
  award_date_lte: str | None = None,
917
920
  awarding_agency: str | None = None,
921
+ commercial_item_acquisition_procedures: str | None = None,
918
922
  expiring_gte: str | None = None,
919
923
  expiring_lte: str | None = None,
920
924
  fiscal_year: int | None = None,
@@ -941,6 +945,8 @@ class TangoClient:
941
945
 
942
946
  This mirrors `/api/idvs/` and supports the same filter parameters as the API,
943
947
  plus shaping via `shape`.
948
+
949
+ `commercial_item_acquisition_procedures` takes an FPDS commercial item acquisition procedures code `A`–`E` (case-insensitive; `E` is DoD Section 803 Commercial Solutions Opening), pipe-separated for OR, e.g. `"A|E"`; an unknown code matches nothing.
944
950
  """
945
951
  params: dict[str, Any] = {"limit": min(limit, 100)}
946
952
  if cursor:
@@ -962,6 +968,7 @@ class TangoClient:
962
968
  ("award_date_gte", award_date_gte),
963
969
  ("award_date_lte", award_date_lte),
964
970
  ("awarding_agency", awarding_agency),
971
+ ("commercial_item_acquisition_procedures", commercial_item_acquisition_procedures),
965
972
  ("expiring_gte", expiring_gte),
966
973
  ("expiring_lte", expiring_lte),
967
974
  ("fiscal_year", fiscal_year),
@@ -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
 
@@ -2247,6 +2247,33 @@ class TestEntityFilters:
2247
2247
  assert "socioeconomic" not in mock_request.call_args[1]["params"]
2248
2248
 
2249
2249
 
2250
+ class TestCommercialItemAcquisitionProceduresFilter:
2251
+ @pytest.mark.parametrize("method", ["list_contracts", "list_idvs"])
2252
+ @patch("tango.client.httpx.Client.request")
2253
+ def test_forwards_pipe_separated_codes_verbatim(self, mock_request, method):
2254
+ _stub_empty_page(mock_request)
2255
+ getattr(TangoClient(api_key="test-key"), method)(
2256
+ commercial_item_acquisition_procedures="a|E"
2257
+ )
2258
+ assert (
2259
+ mock_request.call_args[1]["params"]["commercial_item_acquisition_procedures"] == "a|E"
2260
+ )
2261
+
2262
+ @pytest.mark.parametrize("method", ["list_contracts", "list_idvs"])
2263
+ @patch("tango.client.httpx.Client.request")
2264
+ def test_omits_unset_filter(self, mock_request, method):
2265
+ _stub_empty_page(mock_request)
2266
+ getattr(TangoClient(api_key="test-key"), method)()
2267
+ assert "commercial_item_acquisition_procedures" not in mock_request.call_args[1]["params"]
2268
+
2269
+ @pytest.mark.parametrize("method", ["list_otas", "list_otidvs"])
2270
+ def test_not_accepted_on_other_transaction_lists(self, method):
2271
+ with pytest.raises(TypeError, match="commercial_item_acquisition_procedures"):
2272
+ getattr(TangoClient(api_key="test-key"), method)(
2273
+ commercial_item_acquisition_procedures="E"
2274
+ )
2275
+
2276
+
2250
2277
  class TestAgencyFilterDiagnostics:
2251
2278
  """`meta` from the API's agency-filter diagnostics.
2252
2279
 
@@ -212,6 +212,26 @@ class TestGetEbuyRequest:
212
212
  assert row["attachments"][1]["is_link"] is True
213
213
  assert isinstance(row["attachments"][0]["doc_session_date"], datetime)
214
214
 
215
+ @patch("tango.client.httpx.Client.request")
216
+ def test_extracted_text_is_read_when_named_and_none_without_text(self, mock_request):
217
+ shape = "rfq_id,attachments(doc_seq_num,is_link,extracted_text)"
218
+ _mock(
219
+ mock_request,
220
+ {
221
+ "rfq_id": RFQ_ID,
222
+ "attachments": [
223
+ {"doc_seq_num": 1, "is_link": False, "extracted_text": "Statement of work"},
224
+ {"doc_seq_num": 2, "is_link": True},
225
+ ],
226
+ },
227
+ )
228
+ row = TangoClient(api_key="k").get_ebuy_request(RFQ_ID, shape=shape)
229
+
230
+ assert _call_params(mock_request)["shape"] == shape
231
+ assert row["attachments"][0]["extracted_text"] == "Statement of work"
232
+ assert row["attachments"][1].get("extracted_text") is None
233
+ assert row["attachments"][1]["extracted_text"] is None
234
+
215
235
  @patch("tango.client.httpx.Client.request")
216
236
  def test_out_of_scope_request_is_not_found(self, mock_request):
217
237
  mock_request.return_value = _response(404, {"detail": "No EbuyRequest matches."})
@@ -310,12 +330,22 @@ class TestEbuyShapes:
310
330
  ShapeConfig.EBUY_REQUESTS_COMPREHENSIVE,
311
331
  "rfq_id,organization(agency_code,office_name),attachments(doc_seq_num,is_link)",
312
332
  "rfq_id,amendments,line_items,addresses,oco_aac,ocs_phone",
333
+ "rfq_id,attachments(extracted_text)",
334
+ "rfq_id,attachments(doc_seq_num,doc_name,extracted_text)",
313
335
  ],
314
336
  )
315
337
  def test_shape_validates(self, shape):
316
338
  parser = ShapeParser(cache_enabled=True)
317
339
  parser.validate(parser.parse(shape), EbuyRequest)
318
340
 
341
+ @pytest.mark.parametrize(
342
+ "shape",
343
+ [ShapeConfig.EBUY_REQUESTS_MINIMAL, ShapeConfig.EBUY_REQUESTS_COMPREHENSIVE],
344
+ )
345
+ def test_default_shapes_leave_extracted_text_opt_in(self, shape):
346
+ assert "extracted_text" not in shape
347
+ assert "attachments(*)" not in shape
348
+
319
349
  def test_contract_number_is_a_filter_not_a_response_field(self):
320
350
  parser = ShapeParser(cache_enabled=True)
321
351
  with pytest.raises(ShapeValidationError):
File without changes
File without changes
File without changes