tango-python 0.0.1a1__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.
Files changed (94) hide show
  1. tango/__init__.py +83 -0
  2. tango/_base_client.py +2045 -0
  3. tango/_client.py +544 -0
  4. tango/_compat.py +219 -0
  5. tango/_constants.py +14 -0
  6. tango/_exceptions.py +108 -0
  7. tango/_files.py +123 -0
  8. tango/_models.py +788 -0
  9. tango/_qs.py +150 -0
  10. tango/_resource.py +43 -0
  11. tango/_response.py +824 -0
  12. tango/_streaming.py +333 -0
  13. tango/_types.py +219 -0
  14. tango/_utils/__init__.py +56 -0
  15. tango/_utils/_logs.py +25 -0
  16. tango/_utils/_proxy.py +62 -0
  17. tango/_utils/_reflection.py +42 -0
  18. tango/_utils/_streams.py +12 -0
  19. tango/_utils/_sync.py +71 -0
  20. tango/_utils/_transform.py +392 -0
  21. tango/_utils/_typing.py +120 -0
  22. tango/_utils/_utils.py +414 -0
  23. tango/_version.py +4 -0
  24. tango/lib/.keep +4 -0
  25. tango/py.typed +0 -0
  26. tango/resources/__init__.py +229 -0
  27. tango/resources/agencies.py +255 -0
  28. tango/resources/assistance_listings.py +214 -0
  29. tango/resources/bulk/__init__.py +33 -0
  30. tango/resources/bulk/bulk.py +102 -0
  31. tango/resources/bulk/entities.py +152 -0
  32. tango/resources/business_types.py +218 -0
  33. tango/resources/contracts.py +381 -0
  34. tango/resources/departments.py +210 -0
  35. tango/resources/entities.py +325 -0
  36. tango/resources/idvs/__init__.py +33 -0
  37. tango/resources/idvs/awards.py +287 -0
  38. tango/resources/idvs/idvs.py +413 -0
  39. tango/resources/naics.py +317 -0
  40. tango/resources/notices.py +391 -0
  41. tango/resources/offices.py +281 -0
  42. tango/resources/opportunities.py +420 -0
  43. tango/resources/pscs.py +210 -0
  44. tango/resources/schemas.py +398 -0
  45. tango/resources/subawards.py +313 -0
  46. tango/resources/versions.py +136 -0
  47. tango/types/__init__.py +43 -0
  48. tango/types/agency.py +17 -0
  49. tango/types/agency_list_params.py +14 -0
  50. tango/types/agency_list_response.py +10 -0
  51. tango/types/assistance_listing.py +12 -0
  52. tango/types/assistance_listing_list_response.py +10 -0
  53. tango/types/assistance_listing_retrieve_response.py +26 -0
  54. tango/types/bulk/__init__.py +3 -0
  55. tango/types/business_type.py +14 -0
  56. tango/types/business_type_list_response.py +10 -0
  57. tango/types/contract_list_params.py +78 -0
  58. tango/types/contract_list_response.py +55 -0
  59. tango/types/contract_retrieve_response.py +51 -0
  60. tango/types/department.py +16 -0
  61. tango/types/department_list_response.py +10 -0
  62. tango/types/entity_list_params.py +38 -0
  63. tango/types/entity_list_response.py +37 -0
  64. tango/types/entity_retrieve_response.py +116 -0
  65. tango/types/idv.py +102 -0
  66. tango/types/idv_list_params.py +78 -0
  67. tango/types/idv_list_response.py +27 -0
  68. tango/types/idvs/__init__.py +6 -0
  69. tango/types/idvs/award_list_params.py +55 -0
  70. tango/types/idvs/award_list_response.py +55 -0
  71. tango/types/naic_list_params.py +47 -0
  72. tango/types/naic_list_response.py +10 -0
  73. tango/types/naic_retrieve_response.py +13 -0
  74. tango/types/naics_code.py +13 -0
  75. tango/types/notice_list_params.py +81 -0
  76. tango/types/notice_list_response.py +60 -0
  77. tango/types/notice_retrieve_response.py +93 -0
  78. tango/types/office.py +15 -0
  79. tango/types/office_list_params.py +18 -0
  80. tango/types/office_list_response.py +18 -0
  81. tango/types/opportunity_list_params.py +97 -0
  82. tango/types/opportunity_list_response.py +101 -0
  83. tango/types/opportunity_retrieve_response.py +123 -0
  84. tango/types/product_service_code.py +21 -0
  85. tango/types/psc_list_response.py +10 -0
  86. tango/types/schema_retrieve_params.py +113 -0
  87. tango/types/schema_retrieve_response.py +8 -0
  88. tango/types/subaward.py +172 -0
  89. tango/types/subaward_list_params.py +33 -0
  90. tango/types/subaward_list_response.py +18 -0
  91. tango_python-0.0.1a1.dist-info/METADATA +359 -0
  92. tango_python-0.0.1a1.dist-info/RECORD +94 -0
  93. tango_python-0.0.1a1.dist-info/WHEEL +4 -0
  94. tango_python-0.0.1a1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,172 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["Subaward"]
9
+
10
+
11
+ class Subaward(BaseModel):
12
+ id: int
13
+
14
+ prime_award_unique_key: Optional[str] = None
15
+
16
+ subaward_action_date: Optional[datetime] = None
17
+
18
+ subaward_amount: Optional[float] = None
19
+
20
+ subaward_fsrs_report_id: Optional[str] = None
21
+
22
+ subaward_number: Optional[str] = None
23
+
24
+ subawardee_uei: Optional[str] = None
25
+
26
+ prime_award_amount: Optional[float] = None
27
+
28
+ prime_award_awarding_agency_code: Optional[str] = None
29
+
30
+ prime_award_awarding_agency_name: Optional[str] = None
31
+
32
+ prime_award_awarding_department_code: Optional[int] = None
33
+
34
+ prime_award_awarding_department_name: Optional[str] = None
35
+
36
+ prime_award_awarding_office_code: Optional[str] = None
37
+
38
+ prime_award_awarding_office_name: Optional[str] = None
39
+
40
+ prime_award_base_action_date: Optional[str] = None
41
+
42
+ prime_award_base_action_date_fiscal_year: Optional[int] = None
43
+
44
+ prime_award_base_transaction_description: Optional[str] = None
45
+
46
+ prime_award_federal_accounts_funding_this_award: Optional[str] = None
47
+
48
+ prime_award_funding_agency_code: Optional[str] = None
49
+
50
+ prime_award_funding_agency_name: Optional[str] = None
51
+
52
+ prime_award_funding_department_code: Optional[int] = None
53
+
54
+ prime_award_funding_department_name: Optional[str] = None
55
+
56
+ prime_award_funding_office_code: Optional[str] = None
57
+
58
+ prime_award_funding_office_name: Optional[str] = None
59
+
60
+ prime_award_latest_action_date: Optional[str] = None
61
+
62
+ prime_award_latest_action_date_fiscal_year: Optional[int] = None
63
+
64
+ prime_award_naics_code: Optional[int] = None
65
+
66
+ prime_award_naics_description: Optional[str] = None
67
+
68
+ prime_award_object_classes_funding_this_award: Optional[str] = None
69
+
70
+ prime_award_parent_piid: Optional[str] = None
71
+
72
+ prime_award_piid: Optional[str] = None
73
+
74
+ prime_award_program_activities_funding_this_award: Optional[str] = None
75
+
76
+ prime_award_project_title: Optional[str] = None
77
+
78
+ prime_award_total_outlayed_amount: Optional[float] = None
79
+
80
+ prime_award_treasury_accounts_funding_this_award: Optional[str] = None
81
+
82
+ prime_awardee_name: Optional[str] = None
83
+
84
+ prime_awardee_parent_name: Optional[str] = None
85
+
86
+ prime_awardee_parent_uei: Optional[str] = None
87
+
88
+ prime_awardee_uei: Optional[str] = None
89
+
90
+ subaward_action_date_fiscal_year: Optional[int] = None
91
+
92
+ subaward_description: Optional[str] = None
93
+
94
+ subaward_fsrs_report_last_modified_date: Optional[str] = None
95
+
96
+ subaward_fsrs_report_month: Optional[int] = None
97
+
98
+ subaward_fsrs_report_year: Optional[int] = None
99
+
100
+ subaward_place_of_performance_cd_current: Optional[str] = None
101
+
102
+ subaward_place_of_performance_cd_original: Optional[str] = None
103
+
104
+ subaward_primary_place_of_performance_address_zip_code: Optional[str] = None
105
+
106
+ subaward_primary_place_of_performance_city_name: Optional[str] = None
107
+
108
+ subaward_primary_place_of_performance_country_code: Optional[str] = None
109
+
110
+ subaward_primary_place_of_performance_country_name: Optional[str] = None
111
+
112
+ subaward_primary_place_of_performance_state_code: Optional[str] = None
113
+
114
+ subaward_primary_place_of_performance_state_name: Optional[str] = None
115
+
116
+ subaward_recipient_cd_current: Optional[str] = None
117
+
118
+ subaward_recipient_cd_original: Optional[str] = None
119
+
120
+ subaward_type: Optional[str] = None
121
+
122
+ subawardee_address_line_1: Optional[str] = None
123
+
124
+ subawardee_business_types: Optional[str] = None
125
+
126
+ subawardee_city_name: Optional[str] = None
127
+
128
+ subawardee_country_code: Optional[str] = None
129
+
130
+ subawardee_country_name: Optional[str] = None
131
+
132
+ subawardee_dba_name: Optional[str] = None
133
+
134
+ subawardee_duns: Optional[str] = None
135
+
136
+ subawardee_foreign_postal_code: Optional[str] = None
137
+
138
+ subawardee_highly_compensated_officer_1_amount: Optional[float] = None
139
+
140
+ subawardee_highly_compensated_officer_1_name: Optional[str] = None
141
+
142
+ subawardee_highly_compensated_officer_2_amount: Optional[float] = None
143
+
144
+ subawardee_highly_compensated_officer_2_name: Optional[str] = None
145
+
146
+ subawardee_highly_compensated_officer_3_amount: Optional[float] = None
147
+
148
+ subawardee_highly_compensated_officer_3_name: Optional[str] = None
149
+
150
+ subawardee_highly_compensated_officer_4_amount: Optional[float] = None
151
+
152
+ subawardee_highly_compensated_officer_4_name: Optional[str] = None
153
+
154
+ subawardee_highly_compensated_officer_5_amount: Optional[float] = None
155
+
156
+ subawardee_highly_compensated_officer_5_name: Optional[str] = None
157
+
158
+ subawardee_name: Optional[str] = None
159
+
160
+ subawardee_parent_duns: Optional[str] = None
161
+
162
+ subawardee_parent_name: Optional[str] = None
163
+
164
+ subawardee_parent_uei: Optional[str] = None
165
+
166
+ subawardee_state_code: Optional[str] = None
167
+
168
+ subawardee_state_name: Optional[str] = None
169
+
170
+ subawardee_zip_code: Optional[str] = None
171
+
172
+ usaspending_permalink: Optional[str] = None
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["SubawardListParams"]
8
+
9
+
10
+ class SubawardListParams(TypedDict, total=False):
11
+ awarding_agency: str
12
+ """Awarding agency code"""
13
+
14
+ fiscal_year: int
15
+
16
+ fiscal_year_gte: int
17
+
18
+ fiscal_year_lte: int
19
+
20
+ funding_agency: str
21
+ """Awarding agency code"""
22
+
23
+ limit: int
24
+ """Number of results to return per page."""
25
+
26
+ page: int
27
+ """A page number within the paginated result set."""
28
+
29
+ prime_uei: str
30
+ """Unique Entity Identifier"""
31
+
32
+ sub_uei: str
33
+ """Unique Entity Identifier"""
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from .._models import BaseModel
6
+ from .subaward import Subaward
7
+
8
+ __all__ = ["SubawardListResponse"]
9
+
10
+
11
+ class SubawardListResponse(BaseModel):
12
+ count: int
13
+
14
+ results: List[Subaward]
15
+
16
+ next: Optional[str] = None
17
+
18
+ previous: Optional[str] = None
@@ -0,0 +1,359 @@
1
+ Metadata-Version: 2.3
2
+ Name: tango-python
3
+ Version: 0.0.1a1
4
+ Summary: The official Python library for the tango API
5
+ Project-URL: Homepage, https://github.com/makegov/tango-python
6
+ Project-URL: Repository, https://github.com/makegov/tango-python
7
+ Author-email: Tango <dev-feedback@tango.com>
8
+ License: Apache-2.0
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: MacOS
12
+ Classifier: Operating System :: Microsoft :: Windows
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.8
24
+ Requires-Dist: anyio<5,>=3.5.0
25
+ Requires-Dist: distro<2,>=1.7.0
26
+ Requires-Dist: httpx<1,>=0.23.0
27
+ Requires-Dist: pydantic<3,>=1.9.0
28
+ Requires-Dist: sniffio
29
+ Requires-Dist: typing-extensions<5,>=4.7
30
+ Description-Content-Type: text/markdown
31
+
32
+ # Tango Python API library
33
+
34
+ [![PyPI version](https://img.shields.io/pypi/v/tango-python.svg)](https://pypi.org/project/tango-python/)
35
+
36
+ The Tango Python library provides convenient access to the Tango REST API from any Python 3.8+
37
+ application. The library includes type definitions for all request params and response fields,
38
+ and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
39
+
40
+ It is generated with [Stainless](https://www.stainlessapi.com/).
41
+
42
+ ## Documentation
43
+
44
+ The REST API documentation can be found on [docs.tango.com](https://docs.tango.com). The full API of this library can be found in [api.md](https://github.com/makegov/tango-python/tree/main/api.md).
45
+
46
+ ## Installation
47
+
48
+ ```sh
49
+ # install from PyPI
50
+ pip install --pre tango-python
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ The full API of this library can be found in [api.md](https://github.com/makegov/tango-python/tree/main/api.md).
56
+
57
+ ```python
58
+ from tango import Tango
59
+
60
+ client = Tango(
61
+ client_id="My Client ID",
62
+ client_secret="My Client Secret",
63
+ )
64
+
65
+ schema = client.schemas.retrieve()
66
+ ```
67
+
68
+ ## Async usage
69
+
70
+ Simply import `AsyncTango` instead of `Tango` and use `await` with each API call:
71
+
72
+ ```python
73
+ import asyncio
74
+ from tango import AsyncTango
75
+
76
+ client = AsyncTango(
77
+ client_id="My Client ID",
78
+ client_secret="My Client Secret",
79
+ )
80
+
81
+
82
+ async def main() -> None:
83
+ schema = await client.schemas.retrieve()
84
+
85
+
86
+ asyncio.run(main())
87
+ ```
88
+
89
+ Functionality between the synchronous and asynchronous clients is otherwise identical.
90
+
91
+ ## Using types
92
+
93
+ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
94
+
95
+ - Serializing back into JSON, `model.to_json()`
96
+ - Converting to a dictionary, `model.to_dict()`
97
+
98
+ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
99
+
100
+ ## Handling errors
101
+
102
+ When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `tango.APIConnectionError` is raised.
103
+
104
+ When the API returns a non-success status code (that is, 4xx or 5xx
105
+ response), a subclass of `tango.APIStatusError` is raised, containing `status_code` and `response` properties.
106
+
107
+ All errors inherit from `tango.APIError`.
108
+
109
+ ```python
110
+ import tango
111
+ from tango import Tango
112
+
113
+ client = Tango(
114
+ client_id="My Client ID",
115
+ client_secret="My Client Secret",
116
+ )
117
+
118
+ try:
119
+ client.schemas.retrieve()
120
+ except tango.APIConnectionError as e:
121
+ print("The server could not be reached")
122
+ print(e.__cause__) # an underlying Exception, likely raised within httpx.
123
+ except tango.RateLimitError as e:
124
+ print("A 429 status code was received; we should back off a bit.")
125
+ except tango.APIStatusError as e:
126
+ print("Another non-200-range status code was received")
127
+ print(e.status_code)
128
+ print(e.response)
129
+ ```
130
+
131
+ Error codes are as followed:
132
+
133
+ | Status Code | Error Type |
134
+ | ----------- | -------------------------- |
135
+ | 400 | `BadRequestError` |
136
+ | 401 | `AuthenticationError` |
137
+ | 403 | `PermissionDeniedError` |
138
+ | 404 | `NotFoundError` |
139
+ | 422 | `UnprocessableEntityError` |
140
+ | 429 | `RateLimitError` |
141
+ | >=500 | `InternalServerError` |
142
+ | N/A | `APIConnectionError` |
143
+
144
+ ### Retries
145
+
146
+ Certain errors are automatically retried 2 times by default, with a short exponential backoff.
147
+ Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
148
+ 429 Rate Limit, and >=500 Internal errors are all retried by default.
149
+
150
+ You can use the `max_retries` option to configure or disable retry settings:
151
+
152
+ ```python
153
+ from tango import Tango
154
+
155
+ # Configure the default for all requests:
156
+ client = Tango(
157
+ # default is 2
158
+ max_retries=0,
159
+ client_id="My Client ID",
160
+ client_secret="My Client Secret",
161
+ )
162
+
163
+ # Or, configure per-request:
164
+ client.with_options(max_retries=5).schemas.retrieve()
165
+ ```
166
+
167
+ ### Timeouts
168
+
169
+ By default requests time out after 1 minute. You can configure this with a `timeout` option,
170
+ which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
171
+
172
+ ```python
173
+ from tango import Tango
174
+
175
+ # Configure the default for all requests:
176
+ client = Tango(
177
+ # 20 seconds (default is 1 minute)
178
+ timeout=20.0,
179
+ client_id="My Client ID",
180
+ client_secret="My Client Secret",
181
+ )
182
+
183
+ # More granular control:
184
+ client = Tango(
185
+ timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
186
+ client_id="My Client ID",
187
+ client_secret="My Client Secret",
188
+ )
189
+
190
+ # Override per-request:
191
+ client.with_options(timeout=5.0).schemas.retrieve()
192
+ ```
193
+
194
+ On timeout, an `APITimeoutError` is thrown.
195
+
196
+ Note that requests that time out are [retried twice by default](https://github.com/makegov/tango-python/tree/main/#retries).
197
+
198
+ ## Advanced
199
+
200
+ ### Logging
201
+
202
+ We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.
203
+
204
+ You can enable logging by setting the environment variable `TANGO_LOG` to `info`.
205
+
206
+ ```shell
207
+ $ export TANGO_LOG=info
208
+ ```
209
+
210
+ Or to `debug` for more verbose logging.
211
+
212
+ ### How to tell whether `None` means `null` or missing
213
+
214
+ In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:
215
+
216
+ ```py
217
+ if response.my_field is None:
218
+ if 'my_field' not in response.model_fields_set:
219
+ print('Got json like {}, without a "my_field" key present at all.')
220
+ else:
221
+ print('Got json like {"my_field": null}.')
222
+ ```
223
+
224
+ ### Accessing raw response data (e.g. headers)
225
+
226
+ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
227
+
228
+ ```py
229
+ from tango import Tango
230
+
231
+ client = Tango(
232
+ client_id="My Client ID",
233
+ client_secret="My Client Secret",
234
+ )
235
+ response = client.schemas.with_raw_response.retrieve()
236
+ print(response.headers.get('X-My-Header'))
237
+
238
+ schema = response.parse() # get the object that `schemas.retrieve()` would have returned
239
+ print(schema)
240
+ ```
241
+
242
+ These methods return an [`APIResponse`](https://github.com/makegov/tango-python/tree/main/src/tango/_response.py) object.
243
+
244
+ The async client returns an [`AsyncAPIResponse`](https://github.com/makegov/tango-python/tree/main/src/tango/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
245
+
246
+ #### `.with_streaming_response`
247
+
248
+ The above interface eagerly reads the full response body when you make the request, which may not always be what you want.
249
+
250
+ To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
251
+
252
+ ```python
253
+ with client.schemas.with_streaming_response.retrieve() as response:
254
+ print(response.headers.get("X-My-Header"))
255
+
256
+ for line in response.iter_lines():
257
+ print(line)
258
+ ```
259
+
260
+ The context manager is required so that the response will reliably be closed.
261
+
262
+ ### Making custom/undocumented requests
263
+
264
+ This library is typed for convenient access to the documented API.
265
+
266
+ If you need to access undocumented endpoints, params, or response properties, the library can still be used.
267
+
268
+ #### Undocumented endpoints
269
+
270
+ To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
271
+ http verbs. Options on the client will be respected (such as retries) will be respected when making this
272
+ request.
273
+
274
+ ```py
275
+ import httpx
276
+
277
+ response = client.post(
278
+ "/foo",
279
+ cast_to=httpx.Response,
280
+ body={"my_param": True},
281
+ )
282
+
283
+ print(response.headers.get("x-foo"))
284
+ ```
285
+
286
+ #### Undocumented request params
287
+
288
+ If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request
289
+ options.
290
+
291
+ #### Undocumented response properties
292
+
293
+ To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You
294
+ can also get all the extra fields on the Pydantic model as a dict with
295
+ [`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).
296
+
297
+ ### Configuring the HTTP client
298
+
299
+ You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:
300
+
301
+ - Support for proxies
302
+ - Custom transports
303
+ - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality
304
+
305
+ ```python
306
+ from tango import Tango, DefaultHttpxClient
307
+
308
+ client = Tango(
309
+ # Or use the `TANGO_BASE_URL` env var
310
+ base_url="http://my.test.server.example.com:8083",
311
+ http_client=DefaultHttpxClient(
312
+ proxies="http://my.test.proxy.example.com",
313
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
314
+ ),
315
+ client_id="My Client ID",
316
+ client_secret="My Client Secret",
317
+ )
318
+ ```
319
+
320
+ You can also customize the client on a per-request basis by using `with_options()`:
321
+
322
+ ```python
323
+ client.with_options(http_client=DefaultHttpxClient(...))
324
+ ```
325
+
326
+ ### Managing HTTP resources
327
+
328
+ By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
329
+
330
+ ## Versioning
331
+
332
+ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
333
+
334
+ 1. Changes that only affect static types, without breaking runtime behavior.
335
+ 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
336
+ 3. Changes that we do not expect to impact the vast majority of users in practice.
337
+
338
+ We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
339
+
340
+ We are keen for your feedback; please open an [issue](https://www.github.com/makegov/tango-python/issues) with questions, bugs, or suggestions.
341
+
342
+ ### Determining the installed version
343
+
344
+ If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version.
345
+
346
+ You can determine the version that is being used at runtime with:
347
+
348
+ ```py
349
+ import tango
350
+ print(tango.__version__)
351
+ ```
352
+
353
+ ## Requirements
354
+
355
+ Python 3.8 or higher.
356
+
357
+ ## Contributing
358
+
359
+ See [the contributing documentation](https://github.com/makegov/tango-python/tree/main/./CONTRIBUTING.md).
@@ -0,0 +1,94 @@
1
+ tango/__init__.py,sha256=I0Fbwj-W8-5ssnJdYpUEYJ_OxmvfdIc1scSxce3wweU,2390
2
+ tango/_base_client.py,sha256=c5Xfj6jqa6ShBTgQW4SfVZ28p5p53tHlABoWXJeOWSU,68035
3
+ tango/_client.py,sha256=zD_zKjt2Zylq5-Qf6XYNoQmBsDCi91LVdDQfX2nb96E,24553
4
+ tango/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
5
+ tango/_constants.py,sha256=JE8kyZa2Q4NK_i4fO--8siEYTzeHnT0fYbOFDgDP4uk,464
6
+ tango/_exceptions.py,sha256=VBG4V7QjGllCLdI63Po4zUh-A-3WtSWAaInPLrgSK6M,3218
7
+ tango/_files.py,sha256=mf4dOgL4b0ryyZlbqLhggD3GVgDf6XxdGFAgce01ugE,3549
8
+ tango/_models.py,sha256=uhxvXZC0JO7HuGR_GWXH-zYKuptF2rwiGVJfMMfg3fw,28470
9
+ tango/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
10
+ tango/_resource.py,sha256=LghN7_yX7tA5MRGU9ERUiwkNcWLJ3MlitJAiZZ32sgE,1094
11
+ tango/_response.py,sha256=mXcyG_UlXVoQ9pHzCDuxd9xsPRuUeZecwm7IcENpJb4,28603
12
+ tango/_streaming.py,sha256=iAN9kqaSDlssmGFv-3J9ZrN5iyyu4JUe_Zw0Yvx_fxs,10096
13
+ tango/_types.py,sha256=g1AjHzR4GITnSz0942jQQpsB3X4lLu869n50uSiaSsQ,6166
14
+ tango/_version.py,sha256=oBC6A-ddkKj6IijdBSL0sfQzi9a-x9wGCPJSKMxoDe8,165
15
+ tango/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ tango/_utils/__init__.py,sha256=k266EatJr88V8Zseb7xUimTlCeno9SynRfLwadHP1b4,2016
17
+ tango/_utils/_logs.py,sha256=B_b1gw77XTzSM-qndcu7l5rEgwCca0FP1psqAacKtCs,771
18
+ tango/_utils/_proxy.py,sha256=z3zsateHtb0EARTWKk8QZNHfPkqJbqwd1lM993LBwGE,1902
19
+ tango/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
20
+ tango/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
21
+ tango/_utils/_sync.py,sha256=jJl-iCEaZZUAkq4IUtzN1-aMsKTUFaNoNbeYnnpQjIQ,2438
22
+ tango/_utils/_transform.py,sha256=Dkkyr7OveGmOolepcvXmVJWE3kqim4b0nM0h7yWbgeY,13468
23
+ tango/_utils/_typing.py,sha256=tFbktdpdHCQliwzGsWysgn0P5H0JRdagkZdb_LegGkY,3838
24
+ tango/_utils/_utils.py,sha256=8UmbPOy_AAr2uUjjFui-VZSrVBHRj6bfNEKRp5YZP2A,12004
25
+ tango/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
26
+ tango/resources/__init__.py,sha256=qnH1PBfM1Miw0FMWMTSRe9DEsJZfnRc0JkAcOKEwF0Q,7811
27
+ tango/resources/agencies.py,sha256=NCUNqf-gszXp3IPfxkWy7Om27isJB63MjSqNuyHdrsg,9453
28
+ tango/resources/assistance_listings.py,sha256=jCh8VrjlWr12TP5kn4aRLWIzhe6HNDOYd2m2m72GcW0,8703
29
+ tango/resources/business_types.py,sha256=T4Wj_vlAhKnz2ruz0cGiu6guYPwIBjs1ZuzYgWXAFXI,8393
30
+ tango/resources/contracts.py,sha256=0zgGmRJMyduH08ZlwYjkzaRFlQwKcACQ1zM_mHLMpto,18409
31
+ tango/resources/departments.py,sha256=oFZc3BzoSYMxA-3rY0ds2qPzRVtyCL3TpkryUejKwTo,7911
32
+ tango/resources/entities.py,sha256=7CBnNi_4anvj9gNUEY9Cv3OAn89h4lovkoARfBlJFKs,11813
33
+ tango/resources/naics.py,sha256=5mVsWqnn15pfrI3wjGuwVhYti4kQKZ_BgfBLc-_AfvA,13315
34
+ tango/resources/notices.py,sha256=yHg-YUot9Uc60E5j1ZOzmVs7Je9qGyP2iXMoAXJunb4,19575
35
+ tango/resources/offices.py,sha256=cYed2DlHFDJOe54TcVzGseaXfcGI6bEIyU89D5emiNc,9875
36
+ tango/resources/opportunities.py,sha256=XNnvp1SWQOBcHiMBvHhLqVMmCEasHVeOzqb_u0Egp_U,21496
37
+ tango/resources/pscs.py,sha256=vAYqJIZcAI19b9YfKkl_HVhixs1xXMcntX8tB-gbKsQ,7591
38
+ tango/resources/schemas.py,sha256=XnVESsYFvpGKhnu-NRRKqD_KOwwpbB0Bc-fQLg4sLxA,10548
39
+ tango/resources/subawards.py,sha256=ih5UdTgxDekWJy1jntMVCVTWx4xTJUZTy-u4eRRgbLU,11335
40
+ tango/resources/versions.py,sha256=WJYmSclUCyJ2qUieVV_w-DROjQXdJJVA7yCNXW-vkOI,5017
41
+ tango/resources/bulk/__init__.py,sha256=Vuoa0FbQAMB9Ke0w4ZlU8XiUgNFS3xh3v9ou58IUIfQ,1002
42
+ tango/resources/bulk/bulk.py,sha256=O2sfBWS7q0zodMU4c2tjWLI39qnCTNZxxHL832DPJnI,3577
43
+ tango/resources/bulk/entities.py,sha256=spAwyGqSJyS_MAMkB2UpucpI0wzaznZGRCP7PYv7NmU,5386
44
+ tango/resources/idvs/__init__.py,sha256=BzV8pJ3W3BAGFZFrO7wB8xzVapbhjqiVKJcey4oYnos,976
45
+ tango/resources/idvs/awards.py,sha256=6jH5hn5GAs9p1LKZgUNP4fd5BQ94tx88o1RmbqRuAJQ,11042
46
+ tango/resources/idvs/idvs.py,sha256=p38HVOGJOSz0j-oYlN6fCy2GsMkFjzBuTPQzKU3ECCc,19052
47
+ tango/types/__init__.py,sha256=rwCJqJ8nsBUgVmhLhGIbWD75OmDQNY4Hr73Kv9pr-Tg,2981
48
+ tango/types/agency.py,sha256=Ja8GgdTqKnYuztVNKcMXRixT6AffMZ3SLJeEiBGvAI8,287
49
+ tango/types/agency_list_params.py,sha256=8UN5LSSK0N3w9fdEn0QjlzMPd2KUNgY7upWTbnfz1tQ,468
50
+ tango/types/agency_list_response.py,sha256=VO5svqe-gBLm5J9rWgoH2nKaZ0BQMUBjRjp3oRAoZnA,259
51
+ tango/types/assistance_listing.py,sha256=EhkBhno-szgJMq8E-PPiY0T139oM3DlyMFu5tBRyikk,223
52
+ tango/types/assistance_listing_list_response.py,sha256=bJ2m1hke9ueF-ASYgZSZ_YpvtEkQZWDUbE-fJ-Ur_Lw,315
53
+ tango/types/assistance_listing_retrieve_response.py,sha256=amMCOi_1i8lMkP6GIgFd0brYyghOAaqdm4fxJynjZw0,551
54
+ tango/types/business_type.py,sha256=HafgzHd1DuUTWOwL6rYyGJL5QzGMcthVFdbNEXRmmAg,308
55
+ tango/types/business_type_list_response.py,sha256=iop7YFusaiPzdz_se1on7Dbxz1jBKqNWlFCeIXabRQM,290
56
+ tango/types/contract_list_params.py,sha256=10GbpP6AOmM8ygrgMxNCywMsHxBjskKD-lSY1qsL_0I,3472
57
+ tango/types/contract_list_response.py,sha256=7W7AFBHvmYHeYlvVuXund1hQ9FKEvT4CRamZV63KRZk,1046
58
+ tango/types/contract_retrieve_response.py,sha256=o1hriL8kxLYDHmt2SHuKDQf1UgAbx03b0806Qup0uBk,1017
59
+ tango/types/department.py,sha256=-Uy_tzVvbqFH1Vm_JhuIloZnBCAlZ69_WIgVpKgdNBA,321
60
+ tango/types/department_list_response.py,sha256=QqVDosgg878xCL5GC-ge5TMbsaimQdlOlQrX_cyj9bo,279
61
+ tango/types/entity_list_params.py,sha256=4b-hApYmG7udKh4O8EUJNTYCDqI3LqgTPgRlKNGYhPM,656
62
+ tango/types/entity_list_response.py,sha256=jzL4tx57xJmZqvdV3i3zmpc8uTtAi3QawLw5Z8GhXJ8,712
63
+ tango/types/entity_retrieve_response.py,sha256=t0rKiLX1HrnxGbLrGDEAHMOXxNT-2LOqBZsC82a4DEQ,2580
64
+ tango/types/idv.py,sha256=zYmZ5j9e0Sgj-WvSrDtgL9DolOqkzji_o-ZA2FwYy6w,2053
65
+ tango/types/idv_list_params.py,sha256=TyYDuqixBdZBgRbztADLvNM4hFb-zjtM5kEeBQU0dyo,3462
66
+ tango/types/idv_list_response.py,sha256=G_XNdGqyY0C92F9Eanw2WHzEtNLJykxNi8ZqM4SkaSY,537
67
+ tango/types/naic_list_params.py,sha256=aqAMvYHvD90vqXkFL1z4_qKoeNtMerAPbBNCgshlYoA,1747
68
+ tango/types/naic_list_response.py,sha256=XUrg2XZNqjiHermfbsJQajim6pXyPkswzE7R4okGS7E,265
69
+ tango/types/naic_retrieve_response.py,sha256=D-ae3g4Ack5zKeZBNnGyB9q1gQD72UGdDtSu8a_X0us,261
70
+ tango/types/naics_code.py,sha256=anD-M_gUv8fC0sBTpv4YDJNnmzxh_RN9PJYRuKTGV5w,239
71
+ tango/types/notice_list_params.py,sha256=ACvYZKyXGhQrq1In0SvF1gHMwu2csvJ8SgdCJ-CK7uY,3884
72
+ tango/types/notice_list_response.py,sha256=JZsMbG9LQlREawfQH2PUP40vBtwnes59SpuYZGFZirk,1146
73
+ tango/types/notice_retrieve_response.py,sha256=18ebANURvF7X4u8FJu0NzM7bapty1_aVupESDrjWDHY,1644
74
+ tango/types/office.py,sha256=PBzSF4UmdHIM39Dc0Swn1kYv5jpM_oWYKhAd_xpDAJs,260
75
+ tango/types/office_list_params.py,sha256=dusHj6AW7-3Tqkfof9LVdYD7lr8ssKsGriikERLVdsI,428
76
+ tango/types/office_list_response.py,sha256=Aqy0x0qPMiVBwlSRXeklGWXOxDMGTf4u7Ys0ZqVFjXA,364
77
+ tango/types/opportunity_list_params.py,sha256=Yw56lZtm8jupmGdjcC9JsyXueRoZTv5oOYSJrNiOjd0,4537
78
+ tango/types/opportunity_list_response.py,sha256=wgyfBIhCbcyvgL2DcI6TFKHgMP-iEt-j4a2svZao5H4,1734
79
+ tango/types/opportunity_retrieve_response.py,sha256=5wix3HLenpvfQiAl5XvD_jVc5XD9s4-2xrC88Dq-E4Q,2000
80
+ tango/types/product_service_code.py,sha256=Kn_0UUAe9FQoFw_AvXWfjcVo0DdYEJdaHhv3InWgmHU,455
81
+ tango/types/psc_list_response.py,sha256=gTztY0bhbLFBvbao0blXM4AyNj10-b5tdLP2sGsT51w,291
82
+ tango/types/schema_retrieve_params.py,sha256=Xl3R0Mx4YSMaVZttlNW0IKxGZIM8R6Pbcptlg4pLe8E,1758
83
+ tango/types/schema_retrieve_response.py,sha256=Vg-KU_y3GUJD1cQPZ6CMnRWDIQo2Pzm-x_7iT0zULno,244
84
+ tango/types/subaward.py,sha256=MEmCLF1n1uo70RMLt8W4A-Cc8oaRiDDvehtjATsxb14,5010
85
+ tango/types/subaward_list_params.py,sha256=OJUi9WxAEk0RqoDhOOQugGl8yro4GBHOpqh51Xs3xkQ,679
86
+ tango/types/subaward_list_response.py,sha256=xOWz-IApyY8IXe9CQGieV8SsdXf5dmHB95OV21ECCvY,374
87
+ tango/types/bulk/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
88
+ tango/types/idvs/__init__.py,sha256=84R-HH7_lk77V5pD0zh9L9HCItoViGtaaPTX6mXurXs,261
89
+ tango/types/idvs/award_list_params.py,sha256=YNlg6U5MWDcSm2N_bphzCLoB7xEBMY4UltBZ7p7Wg7g,1364
90
+ tango/types/idvs/award_list_response.py,sha256=hY9s9ibgMm3Vgl-SKuIVvd2S3oHNUKqiiqYX2rkTIU8,1042
91
+ tango_python-0.0.1a1.dist-info/METADATA,sha256=_9Xgc8iOLvar0zgkyeZtqdY7pKfelfU_OUeEdV_D37U,12217
92
+ tango_python-0.0.1a1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
93
+ tango_python-0.0.1a1.dist-info/licenses/LICENSE,sha256=r036zf4L0o-HYhSz2janexS0ghJbZi4LGotf6xpRHS0,11335
94
+ tango_python-0.0.1a1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.26.3
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any