tango-python 1.12.0__py3-none-any.whl → 1.13.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.12.0"
65
+ __version__ = "1.13.0"
66
66
  __all__ = [
67
67
  "TangoClient",
68
68
  "TangoAPIError",
tango/client.py CHANGED
@@ -4450,6 +4450,10 @@ class TangoClient:
4450
4450
  subfunction_code: str | None = None,
4451
4451
  account_category: str | None = None,
4452
4452
  account_category_in: str | None = None,
4453
+ data_through_period: int | None = None,
4454
+ data_through_period_gte: int | None = None,
4455
+ data_through_period_lte: int | None = None,
4456
+ data_through_period_isnull: bool | None = None,
4453
4457
  # Range-numeric filters: each field also accepts ``__gte`` / ``__lte``.
4454
4458
  requested_ba: float | None = None,
4455
4459
  requested_ba_gte: float | None = None,
@@ -4561,6 +4565,8 @@ class TangoClient:
4561
4565
  categories may be added.
4562
4566
  account_category_in: Comma-separated account categories to match
4563
4567
  any of, e.g. ``"budgetary,credit_financing"``.
4568
+ data_through_period: File A period (1-12) the account-year's figures run through (exact). Also ``data_through_period_gte`` / ``data_through_period_lte``; a value below 12 means a partial year.
4569
+ data_through_period_isnull: ``True`` for accounts with no File A data, ``False`` for accounts with it.
4564
4570
  requested_ba: President's-budget requested BA (exact). Also
4565
4571
  ``requested_ba_gte`` / ``requested_ba_lte`` for range queries.
4566
4572
  enacted_ba: Enacted budget authority (exact / gte / lte).
@@ -4630,11 +4636,17 @@ class TangoClient:
4630
4636
  ("subfunction_code", subfunction_code),
4631
4637
  ("account_category", account_category),
4632
4638
  ("account_category__in", account_category_in),
4639
+ ("data_through_period", data_through_period),
4640
+ ("data_through_period__gte", data_through_period_gte),
4641
+ ("data_through_period__lte", data_through_period_lte),
4642
+ ("data_through_period__isnull", data_through_period_isnull),
4633
4643
  ("search", search),
4634
4644
  ("ordering", ordering),
4635
4645
  )
4636
4646
  for key, val in scalar_filters:
4637
- if val is not None:
4647
+ if isinstance(val, bool):
4648
+ params[key] = "true" if val else "false"
4649
+ elif val is not None:
4638
4650
  params[key] = val
4639
4651
  # Range-numeric filters: each field has exact / __gte / __lte forms.
4640
4652
  range_filters: tuple[tuple[str, float | None, float | None, float | None], ...] = (
tango/models.py CHANGED
@@ -489,6 +489,8 @@ class Vehicle:
489
489
  program_acronym: str | None = None
490
490
  description: str | None = None
491
491
  idv_count: int | None = None
492
+ holder_count: int | None = None
493
+ order_winner_count: int | None = None
492
494
  total_obligated: Decimal | None = None
493
495
  latest_award_date: date | None = None
494
496
  solicitation_title: str | None = None
@@ -847,6 +849,8 @@ class BudgetAccount:
847
849
  id: int | None = None
848
850
  federal_account_symbol: str | None = None
849
851
  fiscal_year: int | None = None
852
+ # File A period (1-12) this account-year's figures run through; below 12 the year is partial, and `None` means no File A data.
853
+ data_through_period: int | None = None
850
854
  agency_code: str | None = None
851
855
  agency_name: str | None = None
852
856
  bureau_name: str | None = None
@@ -1752,7 +1756,7 @@ class ShapeConfig:
1752
1756
  VEHICLES_MINIMAL: Final = (
1753
1757
  "uuid,solicitation_identifier,is_synthetic_solicitation,program_acronym,"
1754
1758
  "organization_id,organization,vehicle_type,description,"
1755
- "idv_count,awardee_count,order_count,total_obligated,"
1759
+ "idv_count,holder_count,order_winner_count,awardee_count,order_count,total_obligated,"
1756
1760
  "vehicle_obligations,vehicle_contracts_value,latest_award_date,"
1757
1761
  "solicitation_title,solicitation_date"
1758
1762
  )
@@ -1764,7 +1768,8 @@ class ShapeConfig:
1764
1768
  "solicitation_title,solicitation_description,solicitation_date,opportunity_id,"
1765
1769
  "naics_code,psc_code,set_aside,"
1766
1770
  "fiscal_year,award_date,latest_award_date,last_date_to_order,"
1767
- "description,idv_count,awardee_count,order_count,total_obligated,"
1771
+ "description,idv_count,holder_count,order_winner_count,awardee_count,order_count,"
1772
+ "total_obligated,"
1768
1773
  "vehicle_obligations,vehicle_contracts_value,"
1769
1774
  "type_of_idc,contract_type,metrics(*)"
1770
1775
  )
@@ -1780,7 +1785,8 @@ class ShapeConfig:
1780
1785
  # Default for list_budget_accounts() / get_budget_account()
1781
1786
  # Mirrors the API's BUDGET_ACCOUNT_DEFAULT_SHAPE.
1782
1787
  BUDGET_ACCOUNTS_MINIMAL: Final = (
1783
- "id,federal_account_symbol,fiscal_year,agency_code,agency_name,bureau_name,"
1788
+ "id,federal_account_symbol,fiscal_year,data_through_period,agency_code,agency_name,"
1789
+ "bureau_name,"
1784
1790
  "account_title,bea_category,on_off_budget,subfunction_code,account_category,"
1785
1791
  "requested_ba,enacted_ba,apportioned,obligated_total,outlayed_total,"
1786
1792
  "unobligated_balance,contract_obligated,contract_share_of_obligated_capped,"
@@ -1337,6 +1337,11 @@ VEHICLE_SCHEMA: dict[str, FieldSchema] = {
1337
1337
  ),
1338
1338
  # Denormalized rollups
1339
1339
  "idv_count": FieldSchema(name="idv_count", type=int, is_optional=True, is_list=False),
1340
+ "holder_count": FieldSchema(name="holder_count", type=int, is_optional=True, is_list=False),
1341
+ "order_winner_count": FieldSchema(
1342
+ name="order_winner_count", type=int, is_optional=True, is_list=False
1343
+ ),
1344
+ # Deprecated: same value as `order_winner_count`; removed at the next major API version.
1340
1345
  "awardee_count": FieldSchema(name="awardee_count", type=int, is_optional=True, is_list=False),
1341
1346
  "order_count": FieldSchema(name="order_count", type=int, is_optional=True, is_list=False),
1342
1347
  "total_obligated": FieldSchema(
@@ -1318,6 +1318,9 @@ GENERATED_OVERLAY: dict[str, dict[str, FieldSchema]] = {
1318
1318
  name="contract_share_of_obligated_capped", type=str, is_optional=True, is_list=False
1319
1319
  ),
1320
1320
  "created": FieldSchema(name="created", type=datetime, is_optional=True, is_list=False),
1321
+ "data_through_period": FieldSchema(
1322
+ name="data_through_period", type=int, is_optional=True, is_list=False
1323
+ ),
1321
1324
  "enacted_ba": FieldSchema(name="enacted_ba", type=str, is_optional=True, is_list=False),
1322
1325
  "enacted_ba_5yr_cagr": FieldSchema(
1323
1326
  name="enacted_ba_5yr_cagr", type=str, is_optional=True, is_list=False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tango-python
3
- Version: 1.12.0
3
+ Version: 1.13.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,11 +1,11 @@
1
- tango/__init__.py,sha256=XRADxf8CwMbNTUr999g7MgiFKFuzoSQ0L2szhIIDWtU,2739
2
- tango/client.py,sha256=YkbWxdNE91229sDWwPCizAYfTl1LZK517wuD2I5hPhQ,239391
1
+ tango/__init__.py,sha256=L5_oz-laG934CX8HE8EOPEPW1a7JHmXo7dsTLwCGC5c,2739
2
+ tango/client.py,sha256=N-EKUT2OquRrjpInxK0ZnWVTuDP5ylEXadshjvxO6ng,240281
3
3
  tango/exceptions.py,sha256=oPiLCccBoWLK5SjHkzP-oI6mUD9twEeKSvEuLV5h01I,4224
4
- tango/models.py,sha256=vviVPF0gJQTpqMJE7oGhZrJuavGgwhU5NazlVJBzpYw,69578
4
+ tango/models.py,sha256=w7z49WIMcvvEt05J1DpuUPcFWBq_MbCWa4a-f-YLsVs,69936
5
5
  tango/shapes/__init__.py,sha256=7ea1WU74jp4znhNw-gXruag6m6eyPZtbVgbDFmFUWro,1072
6
- tango/shapes/explicit_schemas.py,sha256=spYyMmWKOiMJygz9yViBQrjIxUPFfv7HpVkJcWy13x8,84021
6
+ tango/shapes/explicit_schemas.py,sha256=tqGitlPoXN4VDfwCU5T4KfzLfQTyZ2Ephap56bDbB3c,84334
7
7
  tango/shapes/factory.py,sha256=uDPhnp6VVzrLBKodxteZy5AcU43juEv-qKVRWth51j0,31550
8
- tango/shapes/generated_overlay.py,sha256=9SNrqVFBz59Xo8-u24-x-74g42juhCKjAArQr9_MM8o,140723
8
+ tango/shapes/generated_overlay.py,sha256=fyCgKDueIKUcTMtij793mtJcAsC8RynMhU5FXI_9hG0,140860
9
9
  tango/shapes/generator.py,sha256=xzakpwTwqTMUr89I06hp54-FIYZziviWHk2Glscg-LM,22775
10
10
  tango/shapes/models.py,sha256=h3pIhOqrrdlN953Y6r0oney5HFbKPOD-frRndRWimJ0,3018
11
11
  tango/shapes/parser.py,sha256=AecNx5oT_hV_pf2AWZnsR8Y2aLmCtjfgS9-znA2Pesc,27429
@@ -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.12.0.dist-info/METADATA,sha256=JsVs05maoR9Q7YGHhn4RQLpqyPG_ptX6BgpGnakcaeI,22118
20
- tango_python-1.12.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
21
- tango_python-1.12.0.dist-info/entry_points.txt,sha256=kGLUbglUjuaAqEFvOZ1QuSW0vWb6VeSpCIFKaOFkKoQ,50
22
- tango_python-1.12.0.dist-info/licenses/LICENSE,sha256=j2kYVHMwTkoGn3ZNScnrdIueG0k2XzB_LCPFoyBc2wk,1064
23
- tango_python-1.12.0.dist-info/RECORD,,
19
+ tango_python-1.13.0.dist-info/METADATA,sha256=fzPg4uS9gC6BNoxJY3lB0b9-FXrX-6mlkkCq0xIX9Wc,22118
20
+ tango_python-1.13.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
21
+ tango_python-1.13.0.dist-info/entry_points.txt,sha256=kGLUbglUjuaAqEFvOZ1QuSW0vWb6VeSpCIFKaOFkKoQ,50
22
+ tango_python-1.13.0.dist-info/licenses/LICENSE,sha256=j2kYVHMwTkoGn3ZNScnrdIueG0k2XzB_LCPFoyBc2wk,1064
23
+ tango_python-1.13.0.dist-info/RECORD,,