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
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ..types import opportunity_list_params
|
|
11
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
12
|
+
from .._utils import (
|
|
13
|
+
maybe_transform,
|
|
14
|
+
async_maybe_transform,
|
|
15
|
+
)
|
|
16
|
+
from .._compat import cached_property
|
|
17
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
18
|
+
from .._response import (
|
|
19
|
+
to_raw_response_wrapper,
|
|
20
|
+
to_streamed_response_wrapper,
|
|
21
|
+
async_to_raw_response_wrapper,
|
|
22
|
+
async_to_streamed_response_wrapper,
|
|
23
|
+
)
|
|
24
|
+
from .._base_client import make_request_options
|
|
25
|
+
from ..types.opportunity_list_response import OpportunityListResponse
|
|
26
|
+
from ..types.opportunity_retrieve_response import OpportunityRetrieveResponse
|
|
27
|
+
|
|
28
|
+
__all__ = ["OpportunitiesResource", "AsyncOpportunitiesResource"]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class OpportunitiesResource(SyncAPIResource):
|
|
32
|
+
@cached_property
|
|
33
|
+
def with_raw_response(self) -> OpportunitiesResourceWithRawResponse:
|
|
34
|
+
"""
|
|
35
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
36
|
+
the raw response object instead of the parsed content.
|
|
37
|
+
|
|
38
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
39
|
+
"""
|
|
40
|
+
return OpportunitiesResourceWithRawResponse(self)
|
|
41
|
+
|
|
42
|
+
@cached_property
|
|
43
|
+
def with_streaming_response(self) -> OpportunitiesResourceWithStreamingResponse:
|
|
44
|
+
"""
|
|
45
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
46
|
+
|
|
47
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
48
|
+
"""
|
|
49
|
+
return OpportunitiesResourceWithStreamingResponse(self)
|
|
50
|
+
|
|
51
|
+
def retrieve(
|
|
52
|
+
self,
|
|
53
|
+
opportunity_id: str,
|
|
54
|
+
*,
|
|
55
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
57
|
+
extra_headers: Headers | None = None,
|
|
58
|
+
extra_query: Query | None = None,
|
|
59
|
+
extra_body: Body | None = None,
|
|
60
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
61
|
+
) -> OpportunityRetrieveResponse:
|
|
62
|
+
"""
|
|
63
|
+
API endpoint that allows opportunities lookup.
|
|
64
|
+
|
|
65
|
+
Args:
|
|
66
|
+
extra_headers: Send extra headers
|
|
67
|
+
|
|
68
|
+
extra_query: Add additional query parameters to the request
|
|
69
|
+
|
|
70
|
+
extra_body: Add additional JSON properties to the request
|
|
71
|
+
|
|
72
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
73
|
+
"""
|
|
74
|
+
if not opportunity_id:
|
|
75
|
+
raise ValueError(f"Expected a non-empty value for `opportunity_id` but received {opportunity_id!r}")
|
|
76
|
+
return self._get(
|
|
77
|
+
f"/api/opportunities/{opportunity_id}/",
|
|
78
|
+
options=make_request_options(
|
|
79
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
80
|
+
),
|
|
81
|
+
cast_to=OpportunityRetrieveResponse,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
def list(
|
|
85
|
+
self,
|
|
86
|
+
*,
|
|
87
|
+
active: bool | NotGiven = NOT_GIVEN,
|
|
88
|
+
agency: str | NotGiven = NOT_GIVEN,
|
|
89
|
+
first_notice_date_after: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
90
|
+
first_notice_date_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
91
|
+
last_notice_date_after: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
92
|
+
last_notice_date_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
93
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
94
|
+
naics: str | NotGiven = NOT_GIVEN,
|
|
95
|
+
notice_type: str | NotGiven = NOT_GIVEN,
|
|
96
|
+
ordering: str | NotGiven = NOT_GIVEN,
|
|
97
|
+
page: int | NotGiven = NOT_GIVEN,
|
|
98
|
+
place_of_performance: str | NotGiven = NOT_GIVEN,
|
|
99
|
+
posted_date_after: str | NotGiven = NOT_GIVEN,
|
|
100
|
+
posted_date_before: str | NotGiven = NOT_GIVEN,
|
|
101
|
+
psc: str | NotGiven = NOT_GIVEN,
|
|
102
|
+
response_deadline_after: str | NotGiven = NOT_GIVEN,
|
|
103
|
+
response_deadline_before: str | NotGiven = NOT_GIVEN,
|
|
104
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
105
|
+
set_aside: str | NotGiven = NOT_GIVEN,
|
|
106
|
+
solicitation_number: str | NotGiven = NOT_GIVEN,
|
|
107
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
108
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
109
|
+
extra_headers: Headers | None = None,
|
|
110
|
+
extra_query: Query | None = None,
|
|
111
|
+
extra_body: Body | None = None,
|
|
112
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
113
|
+
) -> OpportunityListResponse:
|
|
114
|
+
"""
|
|
115
|
+
API endpoint that allows opportunities lookup.
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
active: Filter active and inactive
|
|
119
|
+
|
|
120
|
+
agency: <details><summary>Filter by agency</summary><ul><li>Accepts any agency or department code, acronym, or (partial) name</li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
121
|
+
|
|
122
|
+
first_notice_date_after: Filter by the first notice date
|
|
123
|
+
|
|
124
|
+
first_notice_date_before: Filter by the first notice date
|
|
125
|
+
|
|
126
|
+
last_notice_date_after: Filter by the last notice date
|
|
127
|
+
|
|
128
|
+
last_notice_date_before: Filter by the last notice date
|
|
129
|
+
|
|
130
|
+
limit: Number of results to return per page.
|
|
131
|
+
|
|
132
|
+
naics: <details><summary>Filter by NAICS Code</summary><ul><li><span>Accepted values: <var>541511</var>, <var>541512</var>, <var>etc.</var></span></li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
133
|
+
|
|
134
|
+
notice_type: <details><summary>Filter by notice type</summary><ul><li><span>Accepted values: <var>a</var>, <var>g</var>, <var>f</var>, <var>i</var>, <var>j</var>, <var>k</var>, <var>l</var>, <var>m</var>, <var>o</var>, <var>p</var>, <var>r</var>, <var>s</var>, <var>u</var></span></li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
135
|
+
|
|
136
|
+
ordering: <details><summary>Order results by a field of your choice.</summary><ul><li><span>Accepted values: <var>last_updated</var>, <var>posted_date</var>, <var>response_deadline</var></span></li><li>Prefix with <var>-</var> to reverse order (e.g. <var>-last_updated</var>)</li></ul></details>
|
|
137
|
+
|
|
138
|
+
page: A page number within the paginated result set.
|
|
139
|
+
|
|
140
|
+
place_of_performance: <details><summary>Filter by place of performance</summary><ul><li>Accepts cities, states, zip codes, and 3-character country codes</li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
141
|
+
|
|
142
|
+
posted_date_after: <details><summary>Filter by posted date</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
143
|
+
|
|
144
|
+
posted_date_before: <details><summary>Filter by posted date</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
145
|
+
|
|
146
|
+
psc: <details><summary>Filter by PSC (Product Service Code)</summary><ul><li><span>Accepted values: <var>S222</var>, <var>T005</var>, <var>etc.</var></span></li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
147
|
+
|
|
148
|
+
response_deadline_after: <details><summary>Filter by response deadline</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
149
|
+
|
|
150
|
+
response_deadline_before: <details><summary>Filter by response deadline</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
151
|
+
|
|
152
|
+
search: <details><summary>Search within a notice/opportunity's title, description, or solicitation number</summary><ul><li>Disjunctive with <var>|</var> or <var>OR</var></li><li>Conjunctive with <var>,</var> or <var>AND</var></li><li>Accepts phrases with <var>"</var></li></ul></details>
|
|
153
|
+
|
|
154
|
+
set_aside: <details><summary>Filter by set-aside type</summary><ul><li><span>Accepted values: <var>8A</var>, <var>8AN</var>, <var>BICiv</var>, <var>EDWOSB</var>, <var>EDWOSBSS</var>, <var>HUBZONE</var>, <var>HZC</var>, <var>HZS</var>, <var>IEE</var>, <var>ISBEE</var>, <var>LAS</var>, <var>NONE</var>, <var>SB</var>, <var>SBA</var>, <var>SBP</var>, <var>SDB</var>, <var>SDVOSB</var>, <var>SDVOSBC</var>, <var>SDVOSBS</var>, <var>VOSB</var>, <var>VSA</var>, <var>VSS</var>, <var>WOSB</var>, <var>WOSBSS</var></span></li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
155
|
+
|
|
156
|
+
solicitation_number: Search by solicitation number
|
|
157
|
+
|
|
158
|
+
extra_headers: Send extra headers
|
|
159
|
+
|
|
160
|
+
extra_query: Add additional query parameters to the request
|
|
161
|
+
|
|
162
|
+
extra_body: Add additional JSON properties to the request
|
|
163
|
+
|
|
164
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
165
|
+
"""
|
|
166
|
+
return self._get(
|
|
167
|
+
"/api/opportunities/",
|
|
168
|
+
options=make_request_options(
|
|
169
|
+
extra_headers=extra_headers,
|
|
170
|
+
extra_query=extra_query,
|
|
171
|
+
extra_body=extra_body,
|
|
172
|
+
timeout=timeout,
|
|
173
|
+
query=maybe_transform(
|
|
174
|
+
{
|
|
175
|
+
"active": active,
|
|
176
|
+
"agency": agency,
|
|
177
|
+
"first_notice_date_after": first_notice_date_after,
|
|
178
|
+
"first_notice_date_before": first_notice_date_before,
|
|
179
|
+
"last_notice_date_after": last_notice_date_after,
|
|
180
|
+
"last_notice_date_before": last_notice_date_before,
|
|
181
|
+
"limit": limit,
|
|
182
|
+
"naics": naics,
|
|
183
|
+
"notice_type": notice_type,
|
|
184
|
+
"ordering": ordering,
|
|
185
|
+
"page": page,
|
|
186
|
+
"place_of_performance": place_of_performance,
|
|
187
|
+
"posted_date_after": posted_date_after,
|
|
188
|
+
"posted_date_before": posted_date_before,
|
|
189
|
+
"psc": psc,
|
|
190
|
+
"response_deadline_after": response_deadline_after,
|
|
191
|
+
"response_deadline_before": response_deadline_before,
|
|
192
|
+
"search": search,
|
|
193
|
+
"set_aside": set_aside,
|
|
194
|
+
"solicitation_number": solicitation_number,
|
|
195
|
+
},
|
|
196
|
+
opportunity_list_params.OpportunityListParams,
|
|
197
|
+
),
|
|
198
|
+
),
|
|
199
|
+
cast_to=OpportunityListResponse,
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class AsyncOpportunitiesResource(AsyncAPIResource):
|
|
204
|
+
@cached_property
|
|
205
|
+
def with_raw_response(self) -> AsyncOpportunitiesResourceWithRawResponse:
|
|
206
|
+
"""
|
|
207
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
208
|
+
the raw response object instead of the parsed content.
|
|
209
|
+
|
|
210
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
211
|
+
"""
|
|
212
|
+
return AsyncOpportunitiesResourceWithRawResponse(self)
|
|
213
|
+
|
|
214
|
+
@cached_property
|
|
215
|
+
def with_streaming_response(self) -> AsyncOpportunitiesResourceWithStreamingResponse:
|
|
216
|
+
"""
|
|
217
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
218
|
+
|
|
219
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
220
|
+
"""
|
|
221
|
+
return AsyncOpportunitiesResourceWithStreamingResponse(self)
|
|
222
|
+
|
|
223
|
+
async def retrieve(
|
|
224
|
+
self,
|
|
225
|
+
opportunity_id: str,
|
|
226
|
+
*,
|
|
227
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
228
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
229
|
+
extra_headers: Headers | None = None,
|
|
230
|
+
extra_query: Query | None = None,
|
|
231
|
+
extra_body: Body | None = None,
|
|
232
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
233
|
+
) -> OpportunityRetrieveResponse:
|
|
234
|
+
"""
|
|
235
|
+
API endpoint that allows opportunities lookup.
|
|
236
|
+
|
|
237
|
+
Args:
|
|
238
|
+
extra_headers: Send extra headers
|
|
239
|
+
|
|
240
|
+
extra_query: Add additional query parameters to the request
|
|
241
|
+
|
|
242
|
+
extra_body: Add additional JSON properties to the request
|
|
243
|
+
|
|
244
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
245
|
+
"""
|
|
246
|
+
if not opportunity_id:
|
|
247
|
+
raise ValueError(f"Expected a non-empty value for `opportunity_id` but received {opportunity_id!r}")
|
|
248
|
+
return await self._get(
|
|
249
|
+
f"/api/opportunities/{opportunity_id}/",
|
|
250
|
+
options=make_request_options(
|
|
251
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
252
|
+
),
|
|
253
|
+
cast_to=OpportunityRetrieveResponse,
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
async def list(
|
|
257
|
+
self,
|
|
258
|
+
*,
|
|
259
|
+
active: bool | NotGiven = NOT_GIVEN,
|
|
260
|
+
agency: str | NotGiven = NOT_GIVEN,
|
|
261
|
+
first_notice_date_after: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
262
|
+
first_notice_date_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
263
|
+
last_notice_date_after: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
264
|
+
last_notice_date_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
265
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
266
|
+
naics: str | NotGiven = NOT_GIVEN,
|
|
267
|
+
notice_type: str | NotGiven = NOT_GIVEN,
|
|
268
|
+
ordering: str | NotGiven = NOT_GIVEN,
|
|
269
|
+
page: int | NotGiven = NOT_GIVEN,
|
|
270
|
+
place_of_performance: str | NotGiven = NOT_GIVEN,
|
|
271
|
+
posted_date_after: str | NotGiven = NOT_GIVEN,
|
|
272
|
+
posted_date_before: str | NotGiven = NOT_GIVEN,
|
|
273
|
+
psc: str | NotGiven = NOT_GIVEN,
|
|
274
|
+
response_deadline_after: str | NotGiven = NOT_GIVEN,
|
|
275
|
+
response_deadline_before: str | NotGiven = NOT_GIVEN,
|
|
276
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
277
|
+
set_aside: str | NotGiven = NOT_GIVEN,
|
|
278
|
+
solicitation_number: str | NotGiven = NOT_GIVEN,
|
|
279
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
280
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
281
|
+
extra_headers: Headers | None = None,
|
|
282
|
+
extra_query: Query | None = None,
|
|
283
|
+
extra_body: Body | None = None,
|
|
284
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
285
|
+
) -> OpportunityListResponse:
|
|
286
|
+
"""
|
|
287
|
+
API endpoint that allows opportunities lookup.
|
|
288
|
+
|
|
289
|
+
Args:
|
|
290
|
+
active: Filter active and inactive
|
|
291
|
+
|
|
292
|
+
agency: <details><summary>Filter by agency</summary><ul><li>Accepts any agency or department code, acronym, or (partial) name</li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
293
|
+
|
|
294
|
+
first_notice_date_after: Filter by the first notice date
|
|
295
|
+
|
|
296
|
+
first_notice_date_before: Filter by the first notice date
|
|
297
|
+
|
|
298
|
+
last_notice_date_after: Filter by the last notice date
|
|
299
|
+
|
|
300
|
+
last_notice_date_before: Filter by the last notice date
|
|
301
|
+
|
|
302
|
+
limit: Number of results to return per page.
|
|
303
|
+
|
|
304
|
+
naics: <details><summary>Filter by NAICS Code</summary><ul><li><span>Accepted values: <var>541511</var>, <var>541512</var>, <var>etc.</var></span></li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
305
|
+
|
|
306
|
+
notice_type: <details><summary>Filter by notice type</summary><ul><li><span>Accepted values: <var>a</var>, <var>g</var>, <var>f</var>, <var>i</var>, <var>j</var>, <var>k</var>, <var>l</var>, <var>m</var>, <var>o</var>, <var>p</var>, <var>r</var>, <var>s</var>, <var>u</var></span></li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
307
|
+
|
|
308
|
+
ordering: <details><summary>Order results by a field of your choice.</summary><ul><li><span>Accepted values: <var>last_updated</var>, <var>posted_date</var>, <var>response_deadline</var></span></li><li>Prefix with <var>-</var> to reverse order (e.g. <var>-last_updated</var>)</li></ul></details>
|
|
309
|
+
|
|
310
|
+
page: A page number within the paginated result set.
|
|
311
|
+
|
|
312
|
+
place_of_performance: <details><summary>Filter by place of performance</summary><ul><li>Accepts cities, states, zip codes, and 3-character country codes</li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
313
|
+
|
|
314
|
+
posted_date_after: <details><summary>Filter by posted date</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
315
|
+
|
|
316
|
+
posted_date_before: <details><summary>Filter by posted date</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
317
|
+
|
|
318
|
+
psc: <details><summary>Filter by PSC (Product Service Code)</summary><ul><li><span>Accepted values: <var>S222</var>, <var>T005</var>, <var>etc.</var></span></li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
319
|
+
|
|
320
|
+
response_deadline_after: <details><summary>Filter by response deadline</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
321
|
+
|
|
322
|
+
response_deadline_before: <details><summary>Filter by response deadline</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
323
|
+
|
|
324
|
+
search: <details><summary>Search within a notice/opportunity's title, description, or solicitation number</summary><ul><li>Disjunctive with <var>|</var> or <var>OR</var></li><li>Conjunctive with <var>,</var> or <var>AND</var></li><li>Accepts phrases with <var>"</var></li></ul></details>
|
|
325
|
+
|
|
326
|
+
set_aside: <details><summary>Filter by set-aside type</summary><ul><li><span>Accepted values: <var>8A</var>, <var>8AN</var>, <var>BICiv</var>, <var>EDWOSB</var>, <var>EDWOSBSS</var>, <var>HUBZONE</var>, <var>HZC</var>, <var>HZS</var>, <var>IEE</var>, <var>ISBEE</var>, <var>LAS</var>, <var>NONE</var>, <var>SB</var>, <var>SBA</var>, <var>SBP</var>, <var>SDB</var>, <var>SDVOSB</var>, <var>SDVOSBC</var>, <var>SDVOSBS</var>, <var>VOSB</var>, <var>VSA</var>, <var>VSS</var>, <var>WOSB</var>, <var>WOSBSS</var></span></li><li>Disjunctive with <var>|</var> or <var>OR</var></li></ul></details>
|
|
327
|
+
|
|
328
|
+
solicitation_number: Search by solicitation number
|
|
329
|
+
|
|
330
|
+
extra_headers: Send extra headers
|
|
331
|
+
|
|
332
|
+
extra_query: Add additional query parameters to the request
|
|
333
|
+
|
|
334
|
+
extra_body: Add additional JSON properties to the request
|
|
335
|
+
|
|
336
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
337
|
+
"""
|
|
338
|
+
return await self._get(
|
|
339
|
+
"/api/opportunities/",
|
|
340
|
+
options=make_request_options(
|
|
341
|
+
extra_headers=extra_headers,
|
|
342
|
+
extra_query=extra_query,
|
|
343
|
+
extra_body=extra_body,
|
|
344
|
+
timeout=timeout,
|
|
345
|
+
query=await async_maybe_transform(
|
|
346
|
+
{
|
|
347
|
+
"active": active,
|
|
348
|
+
"agency": agency,
|
|
349
|
+
"first_notice_date_after": first_notice_date_after,
|
|
350
|
+
"first_notice_date_before": first_notice_date_before,
|
|
351
|
+
"last_notice_date_after": last_notice_date_after,
|
|
352
|
+
"last_notice_date_before": last_notice_date_before,
|
|
353
|
+
"limit": limit,
|
|
354
|
+
"naics": naics,
|
|
355
|
+
"notice_type": notice_type,
|
|
356
|
+
"ordering": ordering,
|
|
357
|
+
"page": page,
|
|
358
|
+
"place_of_performance": place_of_performance,
|
|
359
|
+
"posted_date_after": posted_date_after,
|
|
360
|
+
"posted_date_before": posted_date_before,
|
|
361
|
+
"psc": psc,
|
|
362
|
+
"response_deadline_after": response_deadline_after,
|
|
363
|
+
"response_deadline_before": response_deadline_before,
|
|
364
|
+
"search": search,
|
|
365
|
+
"set_aside": set_aside,
|
|
366
|
+
"solicitation_number": solicitation_number,
|
|
367
|
+
},
|
|
368
|
+
opportunity_list_params.OpportunityListParams,
|
|
369
|
+
),
|
|
370
|
+
),
|
|
371
|
+
cast_to=OpportunityListResponse,
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
class OpportunitiesResourceWithRawResponse:
|
|
376
|
+
def __init__(self, opportunities: OpportunitiesResource) -> None:
|
|
377
|
+
self._opportunities = opportunities
|
|
378
|
+
|
|
379
|
+
self.retrieve = to_raw_response_wrapper(
|
|
380
|
+
opportunities.retrieve,
|
|
381
|
+
)
|
|
382
|
+
self.list = to_raw_response_wrapper(
|
|
383
|
+
opportunities.list,
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
class AsyncOpportunitiesResourceWithRawResponse:
|
|
388
|
+
def __init__(self, opportunities: AsyncOpportunitiesResource) -> None:
|
|
389
|
+
self._opportunities = opportunities
|
|
390
|
+
|
|
391
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
392
|
+
opportunities.retrieve,
|
|
393
|
+
)
|
|
394
|
+
self.list = async_to_raw_response_wrapper(
|
|
395
|
+
opportunities.list,
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
class OpportunitiesResourceWithStreamingResponse:
|
|
400
|
+
def __init__(self, opportunities: OpportunitiesResource) -> None:
|
|
401
|
+
self._opportunities = opportunities
|
|
402
|
+
|
|
403
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
404
|
+
opportunities.retrieve,
|
|
405
|
+
)
|
|
406
|
+
self.list = to_streamed_response_wrapper(
|
|
407
|
+
opportunities.list,
|
|
408
|
+
)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
class AsyncOpportunitiesResourceWithStreamingResponse:
|
|
412
|
+
def __init__(self, opportunities: AsyncOpportunitiesResource) -> None:
|
|
413
|
+
self._opportunities = opportunities
|
|
414
|
+
|
|
415
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
416
|
+
opportunities.retrieve,
|
|
417
|
+
)
|
|
418
|
+
self.list = async_to_streamed_response_wrapper(
|
|
419
|
+
opportunities.list,
|
|
420
|
+
)
|
tango/resources/pscs.py
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
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 NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from .._compat import cached_property
|
|
9
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from .._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from .._base_client import make_request_options
|
|
17
|
+
from ..types.psc_list_response import PscListResponse
|
|
18
|
+
from ..types.product_service_code import ProductServiceCode
|
|
19
|
+
|
|
20
|
+
__all__ = ["PscsResource", "AsyncPscsResource"]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class PscsResource(SyncAPIResource):
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> PscsResourceWithRawResponse:
|
|
26
|
+
"""
|
|
27
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
28
|
+
the raw response object instead of the parsed content.
|
|
29
|
+
|
|
30
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
31
|
+
"""
|
|
32
|
+
return PscsResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> PscsResourceWithStreamingResponse:
|
|
36
|
+
"""
|
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
40
|
+
"""
|
|
41
|
+
return PscsResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
def retrieve(
|
|
44
|
+
self,
|
|
45
|
+
id: int,
|
|
46
|
+
*,
|
|
47
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
|
+
extra_headers: Headers | None = None,
|
|
50
|
+
extra_query: Query | None = None,
|
|
51
|
+
extra_body: Body | None = None,
|
|
52
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
53
|
+
) -> ProductServiceCode:
|
|
54
|
+
"""
|
|
55
|
+
API endpoint that allows PSC codes to be viewed.
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
extra_headers: Send extra headers
|
|
59
|
+
|
|
60
|
+
extra_query: Add additional query parameters to the request
|
|
61
|
+
|
|
62
|
+
extra_body: Add additional JSON properties to the request
|
|
63
|
+
|
|
64
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
65
|
+
"""
|
|
66
|
+
return self._get(
|
|
67
|
+
f"/api/psc/{id}/",
|
|
68
|
+
options=make_request_options(
|
|
69
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
70
|
+
),
|
|
71
|
+
cast_to=ProductServiceCode,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
def list(
|
|
75
|
+
self,
|
|
76
|
+
*,
|
|
77
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
78
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
79
|
+
extra_headers: Headers | None = None,
|
|
80
|
+
extra_query: Query | None = None,
|
|
81
|
+
extra_body: Body | None = None,
|
|
82
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
83
|
+
) -> PscListResponse:
|
|
84
|
+
"""API endpoint that allows PSC codes to be viewed."""
|
|
85
|
+
return self._get(
|
|
86
|
+
"/api/psc/",
|
|
87
|
+
options=make_request_options(
|
|
88
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
89
|
+
),
|
|
90
|
+
cast_to=PscListResponse,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class AsyncPscsResource(AsyncAPIResource):
|
|
95
|
+
@cached_property
|
|
96
|
+
def with_raw_response(self) -> AsyncPscsResourceWithRawResponse:
|
|
97
|
+
"""
|
|
98
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
99
|
+
the raw response object instead of the parsed content.
|
|
100
|
+
|
|
101
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
102
|
+
"""
|
|
103
|
+
return AsyncPscsResourceWithRawResponse(self)
|
|
104
|
+
|
|
105
|
+
@cached_property
|
|
106
|
+
def with_streaming_response(self) -> AsyncPscsResourceWithStreamingResponse:
|
|
107
|
+
"""
|
|
108
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
109
|
+
|
|
110
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
111
|
+
"""
|
|
112
|
+
return AsyncPscsResourceWithStreamingResponse(self)
|
|
113
|
+
|
|
114
|
+
async def retrieve(
|
|
115
|
+
self,
|
|
116
|
+
id: int,
|
|
117
|
+
*,
|
|
118
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
119
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
120
|
+
extra_headers: Headers | None = None,
|
|
121
|
+
extra_query: Query | None = None,
|
|
122
|
+
extra_body: Body | None = None,
|
|
123
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
124
|
+
) -> ProductServiceCode:
|
|
125
|
+
"""
|
|
126
|
+
API endpoint that allows PSC codes to be viewed.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
extra_headers: Send extra headers
|
|
130
|
+
|
|
131
|
+
extra_query: Add additional query parameters to the request
|
|
132
|
+
|
|
133
|
+
extra_body: Add additional JSON properties to the request
|
|
134
|
+
|
|
135
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
136
|
+
"""
|
|
137
|
+
return await self._get(
|
|
138
|
+
f"/api/psc/{id}/",
|
|
139
|
+
options=make_request_options(
|
|
140
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
141
|
+
),
|
|
142
|
+
cast_to=ProductServiceCode,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
async def list(
|
|
146
|
+
self,
|
|
147
|
+
*,
|
|
148
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
149
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
150
|
+
extra_headers: Headers | None = None,
|
|
151
|
+
extra_query: Query | None = None,
|
|
152
|
+
extra_body: Body | None = None,
|
|
153
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
154
|
+
) -> PscListResponse:
|
|
155
|
+
"""API endpoint that allows PSC codes to be viewed."""
|
|
156
|
+
return await self._get(
|
|
157
|
+
"/api/psc/",
|
|
158
|
+
options=make_request_options(
|
|
159
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
160
|
+
),
|
|
161
|
+
cast_to=PscListResponse,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class PscsResourceWithRawResponse:
|
|
166
|
+
def __init__(self, pscs: PscsResource) -> None:
|
|
167
|
+
self._pscs = pscs
|
|
168
|
+
|
|
169
|
+
self.retrieve = to_raw_response_wrapper(
|
|
170
|
+
pscs.retrieve,
|
|
171
|
+
)
|
|
172
|
+
self.list = to_raw_response_wrapper(
|
|
173
|
+
pscs.list,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class AsyncPscsResourceWithRawResponse:
|
|
178
|
+
def __init__(self, pscs: AsyncPscsResource) -> None:
|
|
179
|
+
self._pscs = pscs
|
|
180
|
+
|
|
181
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
182
|
+
pscs.retrieve,
|
|
183
|
+
)
|
|
184
|
+
self.list = async_to_raw_response_wrapper(
|
|
185
|
+
pscs.list,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
class PscsResourceWithStreamingResponse:
|
|
190
|
+
def __init__(self, pscs: PscsResource) -> None:
|
|
191
|
+
self._pscs = pscs
|
|
192
|
+
|
|
193
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
194
|
+
pscs.retrieve,
|
|
195
|
+
)
|
|
196
|
+
self.list = to_streamed_response_wrapper(
|
|
197
|
+
pscs.list,
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
class AsyncPscsResourceWithStreamingResponse:
|
|
202
|
+
def __init__(self, pscs: AsyncPscsResource) -> None:
|
|
203
|
+
self._pscs = pscs
|
|
204
|
+
|
|
205
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
206
|
+
pscs.retrieve,
|
|
207
|
+
)
|
|
208
|
+
self.list = async_to_streamed_response_wrapper(
|
|
209
|
+
pscs.list,
|
|
210
|
+
)
|