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.
- tango/__init__.py +83 -0
- tango/_base_client.py +2045 -0
- tango/_client.py +544 -0
- tango/_compat.py +219 -0
- tango/_constants.py +14 -0
- tango/_exceptions.py +108 -0
- tango/_files.py +123 -0
- tango/_models.py +788 -0
- tango/_qs.py +150 -0
- tango/_resource.py +43 -0
- tango/_response.py +824 -0
- tango/_streaming.py +333 -0
- tango/_types.py +219 -0
- tango/_utils/__init__.py +56 -0
- tango/_utils/_logs.py +25 -0
- tango/_utils/_proxy.py +62 -0
- tango/_utils/_reflection.py +42 -0
- tango/_utils/_streams.py +12 -0
- tango/_utils/_sync.py +71 -0
- tango/_utils/_transform.py +392 -0
- tango/_utils/_typing.py +120 -0
- tango/_utils/_utils.py +414 -0
- tango/_version.py +4 -0
- tango/lib/.keep +4 -0
- tango/py.typed +0 -0
- tango/resources/__init__.py +229 -0
- tango/resources/agencies.py +255 -0
- tango/resources/assistance_listings.py +214 -0
- tango/resources/bulk/__init__.py +33 -0
- tango/resources/bulk/bulk.py +102 -0
- tango/resources/bulk/entities.py +152 -0
- tango/resources/business_types.py +218 -0
- tango/resources/contracts.py +381 -0
- tango/resources/departments.py +210 -0
- tango/resources/entities.py +325 -0
- tango/resources/idvs/__init__.py +33 -0
- tango/resources/idvs/awards.py +287 -0
- tango/resources/idvs/idvs.py +413 -0
- tango/resources/naics.py +317 -0
- tango/resources/notices.py +391 -0
- tango/resources/offices.py +281 -0
- tango/resources/opportunities.py +420 -0
- tango/resources/pscs.py +210 -0
- tango/resources/schemas.py +398 -0
- tango/resources/subawards.py +313 -0
- tango/resources/versions.py +136 -0
- tango/types/__init__.py +43 -0
- tango/types/agency.py +17 -0
- tango/types/agency_list_params.py +14 -0
- tango/types/agency_list_response.py +10 -0
- tango/types/assistance_listing.py +12 -0
- tango/types/assistance_listing_list_response.py +10 -0
- tango/types/assistance_listing_retrieve_response.py +26 -0
- tango/types/bulk/__init__.py +3 -0
- tango/types/business_type.py +14 -0
- tango/types/business_type_list_response.py +10 -0
- tango/types/contract_list_params.py +78 -0
- tango/types/contract_list_response.py +55 -0
- tango/types/contract_retrieve_response.py +51 -0
- tango/types/department.py +16 -0
- tango/types/department_list_response.py +10 -0
- tango/types/entity_list_params.py +38 -0
- tango/types/entity_list_response.py +37 -0
- tango/types/entity_retrieve_response.py +116 -0
- tango/types/idv.py +102 -0
- tango/types/idv_list_params.py +78 -0
- tango/types/idv_list_response.py +27 -0
- tango/types/idvs/__init__.py +6 -0
- tango/types/idvs/award_list_params.py +55 -0
- tango/types/idvs/award_list_response.py +55 -0
- tango/types/naic_list_params.py +47 -0
- tango/types/naic_list_response.py +10 -0
- tango/types/naic_retrieve_response.py +13 -0
- tango/types/naics_code.py +13 -0
- tango/types/notice_list_params.py +81 -0
- tango/types/notice_list_response.py +60 -0
- tango/types/notice_retrieve_response.py +93 -0
- tango/types/office.py +15 -0
- tango/types/office_list_params.py +18 -0
- tango/types/office_list_response.py +18 -0
- tango/types/opportunity_list_params.py +97 -0
- tango/types/opportunity_list_response.py +101 -0
- tango/types/opportunity_retrieve_response.py +123 -0
- tango/types/product_service_code.py +21 -0
- tango/types/psc_list_response.py +10 -0
- tango/types/schema_retrieve_params.py +113 -0
- tango/types/schema_retrieve_response.py +8 -0
- tango/types/subaward.py +172 -0
- tango/types/subaward_list_params.py +33 -0
- tango/types/subaward_list_response.py +18 -0
- tango_python-0.0.1a1.dist-info/METADATA +359 -0
- tango_python-0.0.1a1.dist-info/RECORD +94 -0
- tango_python-0.0.1a1.dist-info/WHEEL +4 -0
- tango_python-0.0.1a1.dist-info/licenses/LICENSE +201 -0
tango/resources/naics.py
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..types import naic_list_params
|
|
8
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
9
|
+
from .._utils import (
|
|
10
|
+
maybe_transform,
|
|
11
|
+
async_maybe_transform,
|
|
12
|
+
)
|
|
13
|
+
from .._compat import cached_property
|
|
14
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
from .._response import (
|
|
16
|
+
to_raw_response_wrapper,
|
|
17
|
+
to_streamed_response_wrapper,
|
|
18
|
+
async_to_raw_response_wrapper,
|
|
19
|
+
async_to_streamed_response_wrapper,
|
|
20
|
+
)
|
|
21
|
+
from .._base_client import make_request_options
|
|
22
|
+
from ..types.naic_list_response import NaicListResponse
|
|
23
|
+
from ..types.naic_retrieve_response import NaicRetrieveResponse
|
|
24
|
+
|
|
25
|
+
__all__ = ["NaicsResource", "AsyncNaicsResource"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class NaicsResource(SyncAPIResource):
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> NaicsResourceWithRawResponse:
|
|
31
|
+
"""
|
|
32
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
33
|
+
the raw response object instead of the parsed content.
|
|
34
|
+
|
|
35
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
36
|
+
"""
|
|
37
|
+
return NaicsResourceWithRawResponse(self)
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def with_streaming_response(self) -> NaicsResourceWithStreamingResponse:
|
|
41
|
+
"""
|
|
42
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
43
|
+
|
|
44
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
45
|
+
"""
|
|
46
|
+
return NaicsResourceWithStreamingResponse(self)
|
|
47
|
+
|
|
48
|
+
def retrieve(
|
|
49
|
+
self,
|
|
50
|
+
code: int,
|
|
51
|
+
*,
|
|
52
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
53
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
54
|
+
extra_headers: Headers | None = None,
|
|
55
|
+
extra_query: Query | None = None,
|
|
56
|
+
extra_body: Body | None = None,
|
|
57
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
58
|
+
) -> NaicRetrieveResponse:
|
|
59
|
+
"""
|
|
60
|
+
API endpoint that allows NAICS codes lookup.
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
extra_headers: Send extra headers
|
|
64
|
+
|
|
65
|
+
extra_query: Add additional query parameters to the request
|
|
66
|
+
|
|
67
|
+
extra_body: Add additional JSON properties to the request
|
|
68
|
+
|
|
69
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
70
|
+
"""
|
|
71
|
+
return self._get(
|
|
72
|
+
f"/api/naics/{code}/",
|
|
73
|
+
options=make_request_options(
|
|
74
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
75
|
+
),
|
|
76
|
+
cast_to=NaicRetrieveResponse,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
def list(
|
|
80
|
+
self,
|
|
81
|
+
*,
|
|
82
|
+
employee_limit: str | NotGiven = NOT_GIVEN,
|
|
83
|
+
employee_limit_gte: str | NotGiven = NOT_GIVEN,
|
|
84
|
+
employee_limit_lte: str | NotGiven = NOT_GIVEN,
|
|
85
|
+
revenue_limit: str | NotGiven = NOT_GIVEN,
|
|
86
|
+
revenue_limit_gte: str | NotGiven = NOT_GIVEN,
|
|
87
|
+
revenue_limit_lte: str | NotGiven = NOT_GIVEN,
|
|
88
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
89
|
+
show_limits: str | NotGiven = NOT_GIVEN,
|
|
90
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
91
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
92
|
+
extra_headers: Headers | None = None,
|
|
93
|
+
extra_query: Query | None = None,
|
|
94
|
+
extra_body: Body | None = None,
|
|
95
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
96
|
+
) -> NaicListResponse:
|
|
97
|
+
"""
|
|
98
|
+
API endpoint that allows NAICS codes lookup.
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
employee_limit: <details><summary>Filter by employee limit</summary><ul><li><span>Accepted values: <var>100</var>, <var>750</var>, <var>1500</var></span></li></ul></details>
|
|
102
|
+
|
|
103
|
+
employee_limit_gte: <details><summary>Filter by employee limit</summary><ul><li><span>Accepted values: <var>100</var>, <var>750</var>, <var>1500</var></span></li></ul></details>
|
|
104
|
+
|
|
105
|
+
employee_limit_lte: <details><summary>Filter by employee limit</summary><ul><li><span>Accepted values: <var>100</var>, <var>750</var>, <var>1500</var></span></li></ul></details>
|
|
106
|
+
|
|
107
|
+
revenue_limit: <details><summary>Filter by revenue limit</summary><ul><li><span>Accepted values: <var>20000000</var>, <var>50000000</var></span></li></ul></details>
|
|
108
|
+
|
|
109
|
+
revenue_limit_gte: <details><summary>Filter by revenue limit</summary><ul><li><span>Accepted values: <var>20000000</var>, <var>50000000</var></span></li></ul></details>
|
|
110
|
+
|
|
111
|
+
revenue_limit_lte: <details><summary>Filter by revenue limit</summary><ul><li><span>Accepted values: <var>20000000</var>, <var>50000000</var></span></li></ul></details>
|
|
112
|
+
|
|
113
|
+
search: <details><summary>Filter by code or description</summary><ul><li><span>Accepted values: <var>111110</var>, <var>111</var>, <var>forestry</var></span></li></ul></details>
|
|
114
|
+
|
|
115
|
+
show_limits: If included, size standards will be included in the response
|
|
116
|
+
|
|
117
|
+
extra_headers: Send extra headers
|
|
118
|
+
|
|
119
|
+
extra_query: Add additional query parameters to the request
|
|
120
|
+
|
|
121
|
+
extra_body: Add additional JSON properties to the request
|
|
122
|
+
|
|
123
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
124
|
+
"""
|
|
125
|
+
return self._get(
|
|
126
|
+
"/api/naics/",
|
|
127
|
+
options=make_request_options(
|
|
128
|
+
extra_headers=extra_headers,
|
|
129
|
+
extra_query=extra_query,
|
|
130
|
+
extra_body=extra_body,
|
|
131
|
+
timeout=timeout,
|
|
132
|
+
query=maybe_transform(
|
|
133
|
+
{
|
|
134
|
+
"employee_limit": employee_limit,
|
|
135
|
+
"employee_limit_gte": employee_limit_gte,
|
|
136
|
+
"employee_limit_lte": employee_limit_lte,
|
|
137
|
+
"revenue_limit": revenue_limit,
|
|
138
|
+
"revenue_limit_gte": revenue_limit_gte,
|
|
139
|
+
"revenue_limit_lte": revenue_limit_lte,
|
|
140
|
+
"search": search,
|
|
141
|
+
"show_limits": show_limits,
|
|
142
|
+
},
|
|
143
|
+
naic_list_params.NaicListParams,
|
|
144
|
+
),
|
|
145
|
+
),
|
|
146
|
+
cast_to=NaicListResponse,
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
class AsyncNaicsResource(AsyncAPIResource):
|
|
151
|
+
@cached_property
|
|
152
|
+
def with_raw_response(self) -> AsyncNaicsResourceWithRawResponse:
|
|
153
|
+
"""
|
|
154
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
155
|
+
the raw response object instead of the parsed content.
|
|
156
|
+
|
|
157
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
158
|
+
"""
|
|
159
|
+
return AsyncNaicsResourceWithRawResponse(self)
|
|
160
|
+
|
|
161
|
+
@cached_property
|
|
162
|
+
def with_streaming_response(self) -> AsyncNaicsResourceWithStreamingResponse:
|
|
163
|
+
"""
|
|
164
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
165
|
+
|
|
166
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
167
|
+
"""
|
|
168
|
+
return AsyncNaicsResourceWithStreamingResponse(self)
|
|
169
|
+
|
|
170
|
+
async def retrieve(
|
|
171
|
+
self,
|
|
172
|
+
code: int,
|
|
173
|
+
*,
|
|
174
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
175
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
176
|
+
extra_headers: Headers | None = None,
|
|
177
|
+
extra_query: Query | None = None,
|
|
178
|
+
extra_body: Body | None = None,
|
|
179
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
180
|
+
) -> NaicRetrieveResponse:
|
|
181
|
+
"""
|
|
182
|
+
API endpoint that allows NAICS codes lookup.
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
extra_headers: Send extra headers
|
|
186
|
+
|
|
187
|
+
extra_query: Add additional query parameters to the request
|
|
188
|
+
|
|
189
|
+
extra_body: Add additional JSON properties to the request
|
|
190
|
+
|
|
191
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
192
|
+
"""
|
|
193
|
+
return await self._get(
|
|
194
|
+
f"/api/naics/{code}/",
|
|
195
|
+
options=make_request_options(
|
|
196
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
197
|
+
),
|
|
198
|
+
cast_to=NaicRetrieveResponse,
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
async def list(
|
|
202
|
+
self,
|
|
203
|
+
*,
|
|
204
|
+
employee_limit: str | NotGiven = NOT_GIVEN,
|
|
205
|
+
employee_limit_gte: str | NotGiven = NOT_GIVEN,
|
|
206
|
+
employee_limit_lte: str | NotGiven = NOT_GIVEN,
|
|
207
|
+
revenue_limit: str | NotGiven = NOT_GIVEN,
|
|
208
|
+
revenue_limit_gte: str | NotGiven = NOT_GIVEN,
|
|
209
|
+
revenue_limit_lte: str | NotGiven = NOT_GIVEN,
|
|
210
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
211
|
+
show_limits: str | NotGiven = NOT_GIVEN,
|
|
212
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
213
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
214
|
+
extra_headers: Headers | None = None,
|
|
215
|
+
extra_query: Query | None = None,
|
|
216
|
+
extra_body: Body | None = None,
|
|
217
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
218
|
+
) -> NaicListResponse:
|
|
219
|
+
"""
|
|
220
|
+
API endpoint that allows NAICS codes lookup.
|
|
221
|
+
|
|
222
|
+
Args:
|
|
223
|
+
employee_limit: <details><summary>Filter by employee limit</summary><ul><li><span>Accepted values: <var>100</var>, <var>750</var>, <var>1500</var></span></li></ul></details>
|
|
224
|
+
|
|
225
|
+
employee_limit_gte: <details><summary>Filter by employee limit</summary><ul><li><span>Accepted values: <var>100</var>, <var>750</var>, <var>1500</var></span></li></ul></details>
|
|
226
|
+
|
|
227
|
+
employee_limit_lte: <details><summary>Filter by employee limit</summary><ul><li><span>Accepted values: <var>100</var>, <var>750</var>, <var>1500</var></span></li></ul></details>
|
|
228
|
+
|
|
229
|
+
revenue_limit: <details><summary>Filter by revenue limit</summary><ul><li><span>Accepted values: <var>20000000</var>, <var>50000000</var></span></li></ul></details>
|
|
230
|
+
|
|
231
|
+
revenue_limit_gte: <details><summary>Filter by revenue limit</summary><ul><li><span>Accepted values: <var>20000000</var>, <var>50000000</var></span></li></ul></details>
|
|
232
|
+
|
|
233
|
+
revenue_limit_lte: <details><summary>Filter by revenue limit</summary><ul><li><span>Accepted values: <var>20000000</var>, <var>50000000</var></span></li></ul></details>
|
|
234
|
+
|
|
235
|
+
search: <details><summary>Filter by code or description</summary><ul><li><span>Accepted values: <var>111110</var>, <var>111</var>, <var>forestry</var></span></li></ul></details>
|
|
236
|
+
|
|
237
|
+
show_limits: If included, size standards will be included in the response
|
|
238
|
+
|
|
239
|
+
extra_headers: Send extra headers
|
|
240
|
+
|
|
241
|
+
extra_query: Add additional query parameters to the request
|
|
242
|
+
|
|
243
|
+
extra_body: Add additional JSON properties to the request
|
|
244
|
+
|
|
245
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
246
|
+
"""
|
|
247
|
+
return await self._get(
|
|
248
|
+
"/api/naics/",
|
|
249
|
+
options=make_request_options(
|
|
250
|
+
extra_headers=extra_headers,
|
|
251
|
+
extra_query=extra_query,
|
|
252
|
+
extra_body=extra_body,
|
|
253
|
+
timeout=timeout,
|
|
254
|
+
query=await async_maybe_transform(
|
|
255
|
+
{
|
|
256
|
+
"employee_limit": employee_limit,
|
|
257
|
+
"employee_limit_gte": employee_limit_gte,
|
|
258
|
+
"employee_limit_lte": employee_limit_lte,
|
|
259
|
+
"revenue_limit": revenue_limit,
|
|
260
|
+
"revenue_limit_gte": revenue_limit_gte,
|
|
261
|
+
"revenue_limit_lte": revenue_limit_lte,
|
|
262
|
+
"search": search,
|
|
263
|
+
"show_limits": show_limits,
|
|
264
|
+
},
|
|
265
|
+
naic_list_params.NaicListParams,
|
|
266
|
+
),
|
|
267
|
+
),
|
|
268
|
+
cast_to=NaicListResponse,
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
class NaicsResourceWithRawResponse:
|
|
273
|
+
def __init__(self, naics: NaicsResource) -> None:
|
|
274
|
+
self._naics = naics
|
|
275
|
+
|
|
276
|
+
self.retrieve = to_raw_response_wrapper(
|
|
277
|
+
naics.retrieve,
|
|
278
|
+
)
|
|
279
|
+
self.list = to_raw_response_wrapper(
|
|
280
|
+
naics.list,
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
class AsyncNaicsResourceWithRawResponse:
|
|
285
|
+
def __init__(self, naics: AsyncNaicsResource) -> None:
|
|
286
|
+
self._naics = naics
|
|
287
|
+
|
|
288
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
289
|
+
naics.retrieve,
|
|
290
|
+
)
|
|
291
|
+
self.list = async_to_raw_response_wrapper(
|
|
292
|
+
naics.list,
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
class NaicsResourceWithStreamingResponse:
|
|
297
|
+
def __init__(self, naics: NaicsResource) -> None:
|
|
298
|
+
self._naics = naics
|
|
299
|
+
|
|
300
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
301
|
+
naics.retrieve,
|
|
302
|
+
)
|
|
303
|
+
self.list = to_streamed_response_wrapper(
|
|
304
|
+
naics.list,
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
class AsyncNaicsResourceWithStreamingResponse:
|
|
309
|
+
def __init__(self, naics: AsyncNaicsResource) -> None:
|
|
310
|
+
self._naics = naics
|
|
311
|
+
|
|
312
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
313
|
+
naics.retrieve,
|
|
314
|
+
)
|
|
315
|
+
self.list = async_to_streamed_response_wrapper(
|
|
316
|
+
naics.list,
|
|
317
|
+
)
|