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,391 @@
|
|
|
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 notice_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.notice_list_response import NoticeListResponse
|
|
23
|
+
from ..types.notice_retrieve_response import NoticeRetrieveResponse
|
|
24
|
+
|
|
25
|
+
__all__ = ["NoticesResource", "AsyncNoticesResource"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class NoticesResource(SyncAPIResource):
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> NoticesResourceWithRawResponse:
|
|
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 NoticesResourceWithRawResponse(self)
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def with_streaming_response(self) -> NoticesResourceWithStreamingResponse:
|
|
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 NoticesResourceWithStreamingResponse(self)
|
|
47
|
+
|
|
48
|
+
def retrieve(
|
|
49
|
+
self,
|
|
50
|
+
notice_id: str,
|
|
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
|
+
) -> NoticeRetrieveResponse:
|
|
59
|
+
"""
|
|
60
|
+
API endpoint that allows notices (opportunities) lookup.
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
notice_id: This corresponds to the uuid in SAM.gov. You can have multiple notices for a
|
|
64
|
+
given solicitation.
|
|
65
|
+
|
|
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 notice_id:
|
|
75
|
+
raise ValueError(f"Expected a non-empty value for `notice_id` but received {notice_id!r}")
|
|
76
|
+
return self._get(
|
|
77
|
+
f"/api/notices/{notice_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=NoticeRetrieveResponse,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
def list(
|
|
85
|
+
self,
|
|
86
|
+
*,
|
|
87
|
+
active: bool | NotGiven = NOT_GIVEN,
|
|
88
|
+
agency: str | NotGiven = NOT_GIVEN,
|
|
89
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
90
|
+
naics: str | NotGiven = NOT_GIVEN,
|
|
91
|
+
notice_type: str | NotGiven = NOT_GIVEN,
|
|
92
|
+
ordering: str | NotGiven = NOT_GIVEN,
|
|
93
|
+
page: int | NotGiven = NOT_GIVEN,
|
|
94
|
+
place_of_performance: str | NotGiven = NOT_GIVEN,
|
|
95
|
+
posted_date_after: str | NotGiven = NOT_GIVEN,
|
|
96
|
+
posted_date_before: str | NotGiven = NOT_GIVEN,
|
|
97
|
+
psc: str | NotGiven = NOT_GIVEN,
|
|
98
|
+
response_deadline_after: str | NotGiven = NOT_GIVEN,
|
|
99
|
+
response_deadline_before: str | NotGiven = NOT_GIVEN,
|
|
100
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
101
|
+
set_aside: str | NotGiven = NOT_GIVEN,
|
|
102
|
+
solicitation_number: str | NotGiven = NOT_GIVEN,
|
|
103
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
104
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
105
|
+
extra_headers: Headers | None = None,
|
|
106
|
+
extra_query: Query | None = None,
|
|
107
|
+
extra_body: Body | None = None,
|
|
108
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
109
|
+
) -> NoticeListResponse:
|
|
110
|
+
"""
|
|
111
|
+
API endpoint that allows notices (opportunities) lookup.
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
active: Filter active and inactive
|
|
115
|
+
|
|
116
|
+
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>
|
|
117
|
+
|
|
118
|
+
limit: Number of results to return per page.
|
|
119
|
+
|
|
120
|
+
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>
|
|
121
|
+
|
|
122
|
+
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>
|
|
123
|
+
|
|
124
|
+
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>
|
|
125
|
+
|
|
126
|
+
page: A page number within the paginated result set.
|
|
127
|
+
|
|
128
|
+
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>
|
|
129
|
+
|
|
130
|
+
posted_date_after: <details><summary>Filter by posted date</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
131
|
+
|
|
132
|
+
posted_date_before: <details><summary>Filter by posted date</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
133
|
+
|
|
134
|
+
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>
|
|
135
|
+
|
|
136
|
+
response_deadline_after: <details><summary>Filter by response deadline</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
137
|
+
|
|
138
|
+
response_deadline_before: <details><summary>Filter by response deadline</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
139
|
+
|
|
140
|
+
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>
|
|
141
|
+
|
|
142
|
+
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>
|
|
143
|
+
|
|
144
|
+
solicitation_number: Search by solicitation number
|
|
145
|
+
|
|
146
|
+
extra_headers: Send extra headers
|
|
147
|
+
|
|
148
|
+
extra_query: Add additional query parameters to the request
|
|
149
|
+
|
|
150
|
+
extra_body: Add additional JSON properties to the request
|
|
151
|
+
|
|
152
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
153
|
+
"""
|
|
154
|
+
return self._get(
|
|
155
|
+
"/api/notices/",
|
|
156
|
+
options=make_request_options(
|
|
157
|
+
extra_headers=extra_headers,
|
|
158
|
+
extra_query=extra_query,
|
|
159
|
+
extra_body=extra_body,
|
|
160
|
+
timeout=timeout,
|
|
161
|
+
query=maybe_transform(
|
|
162
|
+
{
|
|
163
|
+
"active": active,
|
|
164
|
+
"agency": agency,
|
|
165
|
+
"limit": limit,
|
|
166
|
+
"naics": naics,
|
|
167
|
+
"notice_type": notice_type,
|
|
168
|
+
"ordering": ordering,
|
|
169
|
+
"page": page,
|
|
170
|
+
"place_of_performance": place_of_performance,
|
|
171
|
+
"posted_date_after": posted_date_after,
|
|
172
|
+
"posted_date_before": posted_date_before,
|
|
173
|
+
"psc": psc,
|
|
174
|
+
"response_deadline_after": response_deadline_after,
|
|
175
|
+
"response_deadline_before": response_deadline_before,
|
|
176
|
+
"search": search,
|
|
177
|
+
"set_aside": set_aside,
|
|
178
|
+
"solicitation_number": solicitation_number,
|
|
179
|
+
},
|
|
180
|
+
notice_list_params.NoticeListParams,
|
|
181
|
+
),
|
|
182
|
+
),
|
|
183
|
+
cast_to=NoticeListResponse,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class AsyncNoticesResource(AsyncAPIResource):
|
|
188
|
+
@cached_property
|
|
189
|
+
def with_raw_response(self) -> AsyncNoticesResourceWithRawResponse:
|
|
190
|
+
"""
|
|
191
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
192
|
+
the raw response object instead of the parsed content.
|
|
193
|
+
|
|
194
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
195
|
+
"""
|
|
196
|
+
return AsyncNoticesResourceWithRawResponse(self)
|
|
197
|
+
|
|
198
|
+
@cached_property
|
|
199
|
+
def with_streaming_response(self) -> AsyncNoticesResourceWithStreamingResponse:
|
|
200
|
+
"""
|
|
201
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
202
|
+
|
|
203
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
204
|
+
"""
|
|
205
|
+
return AsyncNoticesResourceWithStreamingResponse(self)
|
|
206
|
+
|
|
207
|
+
async def retrieve(
|
|
208
|
+
self,
|
|
209
|
+
notice_id: str,
|
|
210
|
+
*,
|
|
211
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
212
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
213
|
+
extra_headers: Headers | None = None,
|
|
214
|
+
extra_query: Query | None = None,
|
|
215
|
+
extra_body: Body | None = None,
|
|
216
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
217
|
+
) -> NoticeRetrieveResponse:
|
|
218
|
+
"""
|
|
219
|
+
API endpoint that allows notices (opportunities) lookup.
|
|
220
|
+
|
|
221
|
+
Args:
|
|
222
|
+
notice_id: This corresponds to the uuid in SAM.gov. You can have multiple notices for a
|
|
223
|
+
given solicitation.
|
|
224
|
+
|
|
225
|
+
extra_headers: Send extra headers
|
|
226
|
+
|
|
227
|
+
extra_query: Add additional query parameters to the request
|
|
228
|
+
|
|
229
|
+
extra_body: Add additional JSON properties to the request
|
|
230
|
+
|
|
231
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
232
|
+
"""
|
|
233
|
+
if not notice_id:
|
|
234
|
+
raise ValueError(f"Expected a non-empty value for `notice_id` but received {notice_id!r}")
|
|
235
|
+
return await self._get(
|
|
236
|
+
f"/api/notices/{notice_id}/",
|
|
237
|
+
options=make_request_options(
|
|
238
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
239
|
+
),
|
|
240
|
+
cast_to=NoticeRetrieveResponse,
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
async def list(
|
|
244
|
+
self,
|
|
245
|
+
*,
|
|
246
|
+
active: bool | NotGiven = NOT_GIVEN,
|
|
247
|
+
agency: str | NotGiven = NOT_GIVEN,
|
|
248
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
249
|
+
naics: str | NotGiven = NOT_GIVEN,
|
|
250
|
+
notice_type: str | NotGiven = NOT_GIVEN,
|
|
251
|
+
ordering: str | NotGiven = NOT_GIVEN,
|
|
252
|
+
page: int | NotGiven = NOT_GIVEN,
|
|
253
|
+
place_of_performance: str | NotGiven = NOT_GIVEN,
|
|
254
|
+
posted_date_after: str | NotGiven = NOT_GIVEN,
|
|
255
|
+
posted_date_before: str | NotGiven = NOT_GIVEN,
|
|
256
|
+
psc: str | NotGiven = NOT_GIVEN,
|
|
257
|
+
response_deadline_after: str | NotGiven = NOT_GIVEN,
|
|
258
|
+
response_deadline_before: str | NotGiven = NOT_GIVEN,
|
|
259
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
260
|
+
set_aside: str | NotGiven = NOT_GIVEN,
|
|
261
|
+
solicitation_number: str | NotGiven = NOT_GIVEN,
|
|
262
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
263
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
264
|
+
extra_headers: Headers | None = None,
|
|
265
|
+
extra_query: Query | None = None,
|
|
266
|
+
extra_body: Body | None = None,
|
|
267
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
268
|
+
) -> NoticeListResponse:
|
|
269
|
+
"""
|
|
270
|
+
API endpoint that allows notices (opportunities) lookup.
|
|
271
|
+
|
|
272
|
+
Args:
|
|
273
|
+
active: Filter active and inactive
|
|
274
|
+
|
|
275
|
+
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>
|
|
276
|
+
|
|
277
|
+
limit: Number of results to return per page.
|
|
278
|
+
|
|
279
|
+
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>
|
|
280
|
+
|
|
281
|
+
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>
|
|
282
|
+
|
|
283
|
+
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>
|
|
284
|
+
|
|
285
|
+
page: A page number within the paginated result set.
|
|
286
|
+
|
|
287
|
+
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>
|
|
288
|
+
|
|
289
|
+
posted_date_after: <details><summary>Filter by posted date</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
290
|
+
|
|
291
|
+
posted_date_before: <details><summary>Filter by posted date</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
292
|
+
|
|
293
|
+
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>
|
|
294
|
+
|
|
295
|
+
response_deadline_after: <details><summary>Filter by response deadline</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
296
|
+
|
|
297
|
+
response_deadline_before: <details><summary>Filter by response deadline</summary><ul><li><span>Accepted values: <var>2024-08-01</var></span></li></ul></details>
|
|
298
|
+
|
|
299
|
+
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>
|
|
300
|
+
|
|
301
|
+
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>
|
|
302
|
+
|
|
303
|
+
solicitation_number: Search by solicitation number
|
|
304
|
+
|
|
305
|
+
extra_headers: Send extra headers
|
|
306
|
+
|
|
307
|
+
extra_query: Add additional query parameters to the request
|
|
308
|
+
|
|
309
|
+
extra_body: Add additional JSON properties to the request
|
|
310
|
+
|
|
311
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
312
|
+
"""
|
|
313
|
+
return await self._get(
|
|
314
|
+
"/api/notices/",
|
|
315
|
+
options=make_request_options(
|
|
316
|
+
extra_headers=extra_headers,
|
|
317
|
+
extra_query=extra_query,
|
|
318
|
+
extra_body=extra_body,
|
|
319
|
+
timeout=timeout,
|
|
320
|
+
query=await async_maybe_transform(
|
|
321
|
+
{
|
|
322
|
+
"active": active,
|
|
323
|
+
"agency": agency,
|
|
324
|
+
"limit": limit,
|
|
325
|
+
"naics": naics,
|
|
326
|
+
"notice_type": notice_type,
|
|
327
|
+
"ordering": ordering,
|
|
328
|
+
"page": page,
|
|
329
|
+
"place_of_performance": place_of_performance,
|
|
330
|
+
"posted_date_after": posted_date_after,
|
|
331
|
+
"posted_date_before": posted_date_before,
|
|
332
|
+
"psc": psc,
|
|
333
|
+
"response_deadline_after": response_deadline_after,
|
|
334
|
+
"response_deadline_before": response_deadline_before,
|
|
335
|
+
"search": search,
|
|
336
|
+
"set_aside": set_aside,
|
|
337
|
+
"solicitation_number": solicitation_number,
|
|
338
|
+
},
|
|
339
|
+
notice_list_params.NoticeListParams,
|
|
340
|
+
),
|
|
341
|
+
),
|
|
342
|
+
cast_to=NoticeListResponse,
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
class NoticesResourceWithRawResponse:
|
|
347
|
+
def __init__(self, notices: NoticesResource) -> None:
|
|
348
|
+
self._notices = notices
|
|
349
|
+
|
|
350
|
+
self.retrieve = to_raw_response_wrapper(
|
|
351
|
+
notices.retrieve,
|
|
352
|
+
)
|
|
353
|
+
self.list = to_raw_response_wrapper(
|
|
354
|
+
notices.list,
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
class AsyncNoticesResourceWithRawResponse:
|
|
359
|
+
def __init__(self, notices: AsyncNoticesResource) -> None:
|
|
360
|
+
self._notices = notices
|
|
361
|
+
|
|
362
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
363
|
+
notices.retrieve,
|
|
364
|
+
)
|
|
365
|
+
self.list = async_to_raw_response_wrapper(
|
|
366
|
+
notices.list,
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
class NoticesResourceWithStreamingResponse:
|
|
371
|
+
def __init__(self, notices: NoticesResource) -> None:
|
|
372
|
+
self._notices = notices
|
|
373
|
+
|
|
374
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
375
|
+
notices.retrieve,
|
|
376
|
+
)
|
|
377
|
+
self.list = to_streamed_response_wrapper(
|
|
378
|
+
notices.list,
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
class AsyncNoticesResourceWithStreamingResponse:
|
|
383
|
+
def __init__(self, notices: AsyncNoticesResource) -> None:
|
|
384
|
+
self._notices = notices
|
|
385
|
+
|
|
386
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
387
|
+
notices.retrieve,
|
|
388
|
+
)
|
|
389
|
+
self.list = async_to_streamed_response_wrapper(
|
|
390
|
+
notices.list,
|
|
391
|
+
)
|
|
@@ -0,0 +1,281 @@
|
|
|
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 office_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.office import Office
|
|
23
|
+
from ..types.office_list_response import OfficeListResponse
|
|
24
|
+
|
|
25
|
+
__all__ = ["OfficesResource", "AsyncOfficesResource"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class OfficesResource(SyncAPIResource):
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> OfficesResourceWithRawResponse:
|
|
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 OfficesResourceWithRawResponse(self)
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def with_streaming_response(self) -> OfficesResourceWithStreamingResponse:
|
|
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 OfficesResourceWithStreamingResponse(self)
|
|
47
|
+
|
|
48
|
+
def retrieve(
|
|
49
|
+
self,
|
|
50
|
+
code: str,
|
|
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
|
+
) -> Office:
|
|
59
|
+
"""
|
|
60
|
+
API endpoint that allows offices to be viewed.
|
|
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
|
+
if not code:
|
|
72
|
+
raise ValueError(f"Expected a non-empty value for `code` but received {code!r}")
|
|
73
|
+
return self._get(
|
|
74
|
+
f"/api/offices/{code}/",
|
|
75
|
+
options=make_request_options(
|
|
76
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
77
|
+
),
|
|
78
|
+
cast_to=Office,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
def list(
|
|
82
|
+
self,
|
|
83
|
+
*,
|
|
84
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
85
|
+
page: int | NotGiven = NOT_GIVEN,
|
|
86
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
87
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
88
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
89
|
+
extra_headers: Headers | None = None,
|
|
90
|
+
extra_query: Query | None = None,
|
|
91
|
+
extra_body: Body | None = None,
|
|
92
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
93
|
+
) -> OfficeListResponse:
|
|
94
|
+
"""
|
|
95
|
+
API endpoint that allows offices to be viewed.
|
|
96
|
+
|
|
97
|
+
Args:
|
|
98
|
+
limit: Number of results to return per page.
|
|
99
|
+
|
|
100
|
+
page: A page number within the paginated result set.
|
|
101
|
+
|
|
102
|
+
search: Search for an office
|
|
103
|
+
|
|
104
|
+
extra_headers: Send extra headers
|
|
105
|
+
|
|
106
|
+
extra_query: Add additional query parameters to the request
|
|
107
|
+
|
|
108
|
+
extra_body: Add additional JSON properties to the request
|
|
109
|
+
|
|
110
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
111
|
+
"""
|
|
112
|
+
return self._get(
|
|
113
|
+
"/api/offices/",
|
|
114
|
+
options=make_request_options(
|
|
115
|
+
extra_headers=extra_headers,
|
|
116
|
+
extra_query=extra_query,
|
|
117
|
+
extra_body=extra_body,
|
|
118
|
+
timeout=timeout,
|
|
119
|
+
query=maybe_transform(
|
|
120
|
+
{
|
|
121
|
+
"limit": limit,
|
|
122
|
+
"page": page,
|
|
123
|
+
"search": search,
|
|
124
|
+
},
|
|
125
|
+
office_list_params.OfficeListParams,
|
|
126
|
+
),
|
|
127
|
+
),
|
|
128
|
+
cast_to=OfficeListResponse,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class AsyncOfficesResource(AsyncAPIResource):
|
|
133
|
+
@cached_property
|
|
134
|
+
def with_raw_response(self) -> AsyncOfficesResourceWithRawResponse:
|
|
135
|
+
"""
|
|
136
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
137
|
+
the raw response object instead of the parsed content.
|
|
138
|
+
|
|
139
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
140
|
+
"""
|
|
141
|
+
return AsyncOfficesResourceWithRawResponse(self)
|
|
142
|
+
|
|
143
|
+
@cached_property
|
|
144
|
+
def with_streaming_response(self) -> AsyncOfficesResourceWithStreamingResponse:
|
|
145
|
+
"""
|
|
146
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
147
|
+
|
|
148
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
149
|
+
"""
|
|
150
|
+
return AsyncOfficesResourceWithStreamingResponse(self)
|
|
151
|
+
|
|
152
|
+
async def retrieve(
|
|
153
|
+
self,
|
|
154
|
+
code: str,
|
|
155
|
+
*,
|
|
156
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
157
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
158
|
+
extra_headers: Headers | None = None,
|
|
159
|
+
extra_query: Query | None = None,
|
|
160
|
+
extra_body: Body | None = None,
|
|
161
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
162
|
+
) -> Office:
|
|
163
|
+
"""
|
|
164
|
+
API endpoint that allows offices to be viewed.
|
|
165
|
+
|
|
166
|
+
Args:
|
|
167
|
+
extra_headers: Send extra headers
|
|
168
|
+
|
|
169
|
+
extra_query: Add additional query parameters to the request
|
|
170
|
+
|
|
171
|
+
extra_body: Add additional JSON properties to the request
|
|
172
|
+
|
|
173
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
174
|
+
"""
|
|
175
|
+
if not code:
|
|
176
|
+
raise ValueError(f"Expected a non-empty value for `code` but received {code!r}")
|
|
177
|
+
return await self._get(
|
|
178
|
+
f"/api/offices/{code}/",
|
|
179
|
+
options=make_request_options(
|
|
180
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
181
|
+
),
|
|
182
|
+
cast_to=Office,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
async def list(
|
|
186
|
+
self,
|
|
187
|
+
*,
|
|
188
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
189
|
+
page: int | NotGiven = NOT_GIVEN,
|
|
190
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
191
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
192
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
193
|
+
extra_headers: Headers | None = None,
|
|
194
|
+
extra_query: Query | None = None,
|
|
195
|
+
extra_body: Body | None = None,
|
|
196
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
197
|
+
) -> OfficeListResponse:
|
|
198
|
+
"""
|
|
199
|
+
API endpoint that allows offices to be viewed.
|
|
200
|
+
|
|
201
|
+
Args:
|
|
202
|
+
limit: Number of results to return per page.
|
|
203
|
+
|
|
204
|
+
page: A page number within the paginated result set.
|
|
205
|
+
|
|
206
|
+
search: Search for an office
|
|
207
|
+
|
|
208
|
+
extra_headers: Send extra headers
|
|
209
|
+
|
|
210
|
+
extra_query: Add additional query parameters to the request
|
|
211
|
+
|
|
212
|
+
extra_body: Add additional JSON properties to the request
|
|
213
|
+
|
|
214
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
215
|
+
"""
|
|
216
|
+
return await self._get(
|
|
217
|
+
"/api/offices/",
|
|
218
|
+
options=make_request_options(
|
|
219
|
+
extra_headers=extra_headers,
|
|
220
|
+
extra_query=extra_query,
|
|
221
|
+
extra_body=extra_body,
|
|
222
|
+
timeout=timeout,
|
|
223
|
+
query=await async_maybe_transform(
|
|
224
|
+
{
|
|
225
|
+
"limit": limit,
|
|
226
|
+
"page": page,
|
|
227
|
+
"search": search,
|
|
228
|
+
},
|
|
229
|
+
office_list_params.OfficeListParams,
|
|
230
|
+
),
|
|
231
|
+
),
|
|
232
|
+
cast_to=OfficeListResponse,
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
class OfficesResourceWithRawResponse:
|
|
237
|
+
def __init__(self, offices: OfficesResource) -> None:
|
|
238
|
+
self._offices = offices
|
|
239
|
+
|
|
240
|
+
self.retrieve = to_raw_response_wrapper(
|
|
241
|
+
offices.retrieve,
|
|
242
|
+
)
|
|
243
|
+
self.list = to_raw_response_wrapper(
|
|
244
|
+
offices.list,
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
class AsyncOfficesResourceWithRawResponse:
|
|
249
|
+
def __init__(self, offices: AsyncOfficesResource) -> None:
|
|
250
|
+
self._offices = offices
|
|
251
|
+
|
|
252
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
253
|
+
offices.retrieve,
|
|
254
|
+
)
|
|
255
|
+
self.list = async_to_raw_response_wrapper(
|
|
256
|
+
offices.list,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
class OfficesResourceWithStreamingResponse:
|
|
261
|
+
def __init__(self, offices: OfficesResource) -> None:
|
|
262
|
+
self._offices = offices
|
|
263
|
+
|
|
264
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
265
|
+
offices.retrieve,
|
|
266
|
+
)
|
|
267
|
+
self.list = to_streamed_response_wrapper(
|
|
268
|
+
offices.list,
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
class AsyncOfficesResourceWithStreamingResponse:
|
|
273
|
+
def __init__(self, offices: AsyncOfficesResource) -> None:
|
|
274
|
+
self._offices = offices
|
|
275
|
+
|
|
276
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
277
|
+
offices.retrieve,
|
|
278
|
+
)
|
|
279
|
+
self.list = async_to_streamed_response_wrapper(
|
|
280
|
+
offices.list,
|
|
281
|
+
)
|