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,255 @@
|
|
|
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 agency_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.agency import Agency
|
|
23
|
+
from ..types.agency_list_response import AgencyListResponse
|
|
24
|
+
|
|
25
|
+
__all__ = ["AgenciesResource", "AsyncAgenciesResource"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class AgenciesResource(SyncAPIResource):
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> AgenciesResourceWithRawResponse:
|
|
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 AgenciesResourceWithRawResponse(self)
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def with_streaming_response(self) -> AgenciesResourceWithStreamingResponse:
|
|
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 AgenciesResourceWithStreamingResponse(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
|
+
) -> Agency:
|
|
59
|
+
"""
|
|
60
|
+
API endpoint that allows agencies 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
|
+
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/agencies/{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=Agency,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
def list(
|
|
82
|
+
self,
|
|
83
|
+
*,
|
|
84
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
85
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
86
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
87
|
+
extra_headers: Headers | None = None,
|
|
88
|
+
extra_query: Query | None = None,
|
|
89
|
+
extra_body: Body | None = None,
|
|
90
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
91
|
+
) -> AgencyListResponse:
|
|
92
|
+
"""
|
|
93
|
+
API endpoint that allows agencies lookup.
|
|
94
|
+
|
|
95
|
+
Args:
|
|
96
|
+
search: <details><summary>Filter by </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>
|
|
97
|
+
|
|
98
|
+
extra_headers: Send extra headers
|
|
99
|
+
|
|
100
|
+
extra_query: Add additional query parameters to the request
|
|
101
|
+
|
|
102
|
+
extra_body: Add additional JSON properties to the request
|
|
103
|
+
|
|
104
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
105
|
+
"""
|
|
106
|
+
return self._get(
|
|
107
|
+
"/api/agencies/",
|
|
108
|
+
options=make_request_options(
|
|
109
|
+
extra_headers=extra_headers,
|
|
110
|
+
extra_query=extra_query,
|
|
111
|
+
extra_body=extra_body,
|
|
112
|
+
timeout=timeout,
|
|
113
|
+
query=maybe_transform({"search": search}, agency_list_params.AgencyListParams),
|
|
114
|
+
),
|
|
115
|
+
cast_to=AgencyListResponse,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class AsyncAgenciesResource(AsyncAPIResource):
|
|
120
|
+
@cached_property
|
|
121
|
+
def with_raw_response(self) -> AsyncAgenciesResourceWithRawResponse:
|
|
122
|
+
"""
|
|
123
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
124
|
+
the raw response object instead of the parsed content.
|
|
125
|
+
|
|
126
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
127
|
+
"""
|
|
128
|
+
return AsyncAgenciesResourceWithRawResponse(self)
|
|
129
|
+
|
|
130
|
+
@cached_property
|
|
131
|
+
def with_streaming_response(self) -> AsyncAgenciesResourceWithStreamingResponse:
|
|
132
|
+
"""
|
|
133
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
134
|
+
|
|
135
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
136
|
+
"""
|
|
137
|
+
return AsyncAgenciesResourceWithStreamingResponse(self)
|
|
138
|
+
|
|
139
|
+
async def retrieve(
|
|
140
|
+
self,
|
|
141
|
+
code: str,
|
|
142
|
+
*,
|
|
143
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
144
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
145
|
+
extra_headers: Headers | None = None,
|
|
146
|
+
extra_query: Query | None = None,
|
|
147
|
+
extra_body: Body | None = None,
|
|
148
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
149
|
+
) -> Agency:
|
|
150
|
+
"""
|
|
151
|
+
API endpoint that allows agencies lookup.
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
extra_headers: Send extra headers
|
|
155
|
+
|
|
156
|
+
extra_query: Add additional query parameters to the request
|
|
157
|
+
|
|
158
|
+
extra_body: Add additional JSON properties to the request
|
|
159
|
+
|
|
160
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
161
|
+
"""
|
|
162
|
+
if not code:
|
|
163
|
+
raise ValueError(f"Expected a non-empty value for `code` but received {code!r}")
|
|
164
|
+
return await self._get(
|
|
165
|
+
f"/api/agencies/{code}/",
|
|
166
|
+
options=make_request_options(
|
|
167
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
168
|
+
),
|
|
169
|
+
cast_to=Agency,
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
async def list(
|
|
173
|
+
self,
|
|
174
|
+
*,
|
|
175
|
+
search: str | NotGiven = NOT_GIVEN,
|
|
176
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
177
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
178
|
+
extra_headers: Headers | None = None,
|
|
179
|
+
extra_query: Query | None = None,
|
|
180
|
+
extra_body: Body | None = None,
|
|
181
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
182
|
+
) -> AgencyListResponse:
|
|
183
|
+
"""
|
|
184
|
+
API endpoint that allows agencies lookup.
|
|
185
|
+
|
|
186
|
+
Args:
|
|
187
|
+
search: <details><summary>Filter by </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>
|
|
188
|
+
|
|
189
|
+
extra_headers: Send extra headers
|
|
190
|
+
|
|
191
|
+
extra_query: Add additional query parameters to the request
|
|
192
|
+
|
|
193
|
+
extra_body: Add additional JSON properties to the request
|
|
194
|
+
|
|
195
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
196
|
+
"""
|
|
197
|
+
return await self._get(
|
|
198
|
+
"/api/agencies/",
|
|
199
|
+
options=make_request_options(
|
|
200
|
+
extra_headers=extra_headers,
|
|
201
|
+
extra_query=extra_query,
|
|
202
|
+
extra_body=extra_body,
|
|
203
|
+
timeout=timeout,
|
|
204
|
+
query=await async_maybe_transform({"search": search}, agency_list_params.AgencyListParams),
|
|
205
|
+
),
|
|
206
|
+
cast_to=AgencyListResponse,
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
class AgenciesResourceWithRawResponse:
|
|
211
|
+
def __init__(self, agencies: AgenciesResource) -> None:
|
|
212
|
+
self._agencies = agencies
|
|
213
|
+
|
|
214
|
+
self.retrieve = to_raw_response_wrapper(
|
|
215
|
+
agencies.retrieve,
|
|
216
|
+
)
|
|
217
|
+
self.list = to_raw_response_wrapper(
|
|
218
|
+
agencies.list,
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
class AsyncAgenciesResourceWithRawResponse:
|
|
223
|
+
def __init__(self, agencies: AsyncAgenciesResource) -> None:
|
|
224
|
+
self._agencies = agencies
|
|
225
|
+
|
|
226
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
227
|
+
agencies.retrieve,
|
|
228
|
+
)
|
|
229
|
+
self.list = async_to_raw_response_wrapper(
|
|
230
|
+
agencies.list,
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
class AgenciesResourceWithStreamingResponse:
|
|
235
|
+
def __init__(self, agencies: AgenciesResource) -> None:
|
|
236
|
+
self._agencies = agencies
|
|
237
|
+
|
|
238
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
239
|
+
agencies.retrieve,
|
|
240
|
+
)
|
|
241
|
+
self.list = to_streamed_response_wrapper(
|
|
242
|
+
agencies.list,
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
class AsyncAgenciesResourceWithStreamingResponse:
|
|
247
|
+
def __init__(self, agencies: AsyncAgenciesResource) -> None:
|
|
248
|
+
self._agencies = agencies
|
|
249
|
+
|
|
250
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
251
|
+
agencies.retrieve,
|
|
252
|
+
)
|
|
253
|
+
self.list = async_to_streamed_response_wrapper(
|
|
254
|
+
agencies.list,
|
|
255
|
+
)
|
|
@@ -0,0 +1,214 @@
|
|
|
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.assistance_listing_list_response import AssistanceListingListResponse
|
|
18
|
+
from ..types.assistance_listing_retrieve_response import AssistanceListingRetrieveResponse
|
|
19
|
+
|
|
20
|
+
__all__ = ["AssistanceListingsResource", "AsyncAssistanceListingsResource"]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class AssistanceListingsResource(SyncAPIResource):
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> AssistanceListingsResourceWithRawResponse:
|
|
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 AssistanceListingsResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> AssistanceListingsResourceWithStreamingResponse:
|
|
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 AssistanceListingsResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
def retrieve(
|
|
44
|
+
self,
|
|
45
|
+
number: str,
|
|
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
|
+
) -> AssistanceListingRetrieveResponse:
|
|
54
|
+
"""
|
|
55
|
+
API endpoint that allows Assistance Listing 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
|
+
if not number:
|
|
67
|
+
raise ValueError(f"Expected a non-empty value for `number` but received {number!r}")
|
|
68
|
+
return self._get(
|
|
69
|
+
f"/api/assistance_listings/{number}/",
|
|
70
|
+
options=make_request_options(
|
|
71
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
72
|
+
),
|
|
73
|
+
cast_to=AssistanceListingRetrieveResponse,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
def list(
|
|
77
|
+
self,
|
|
78
|
+
*,
|
|
79
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
80
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
81
|
+
extra_headers: Headers | None = None,
|
|
82
|
+
extra_query: Query | None = None,
|
|
83
|
+
extra_body: Body | None = None,
|
|
84
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
85
|
+
) -> AssistanceListingListResponse:
|
|
86
|
+
"""API endpoint that allows Assistance Listing to be viewed."""
|
|
87
|
+
return self._get(
|
|
88
|
+
"/api/assistance_listings/",
|
|
89
|
+
options=make_request_options(
|
|
90
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
91
|
+
),
|
|
92
|
+
cast_to=AssistanceListingListResponse,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncAssistanceListingsResource(AsyncAPIResource):
|
|
97
|
+
@cached_property
|
|
98
|
+
def with_raw_response(self) -> AsyncAssistanceListingsResourceWithRawResponse:
|
|
99
|
+
"""
|
|
100
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
101
|
+
the raw response object instead of the parsed content.
|
|
102
|
+
|
|
103
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
104
|
+
"""
|
|
105
|
+
return AsyncAssistanceListingsResourceWithRawResponse(self)
|
|
106
|
+
|
|
107
|
+
@cached_property
|
|
108
|
+
def with_streaming_response(self) -> AsyncAssistanceListingsResourceWithStreamingResponse:
|
|
109
|
+
"""
|
|
110
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
111
|
+
|
|
112
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
113
|
+
"""
|
|
114
|
+
return AsyncAssistanceListingsResourceWithStreamingResponse(self)
|
|
115
|
+
|
|
116
|
+
async def retrieve(
|
|
117
|
+
self,
|
|
118
|
+
number: str,
|
|
119
|
+
*,
|
|
120
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
121
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
122
|
+
extra_headers: Headers | None = None,
|
|
123
|
+
extra_query: Query | None = None,
|
|
124
|
+
extra_body: Body | None = None,
|
|
125
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
126
|
+
) -> AssistanceListingRetrieveResponse:
|
|
127
|
+
"""
|
|
128
|
+
API endpoint that allows Assistance Listing to be viewed.
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
extra_headers: Send extra headers
|
|
132
|
+
|
|
133
|
+
extra_query: Add additional query parameters to the request
|
|
134
|
+
|
|
135
|
+
extra_body: Add additional JSON properties to the request
|
|
136
|
+
|
|
137
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
138
|
+
"""
|
|
139
|
+
if not number:
|
|
140
|
+
raise ValueError(f"Expected a non-empty value for `number` but received {number!r}")
|
|
141
|
+
return await self._get(
|
|
142
|
+
f"/api/assistance_listings/{number}/",
|
|
143
|
+
options=make_request_options(
|
|
144
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
145
|
+
),
|
|
146
|
+
cast_to=AssistanceListingRetrieveResponse,
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
async def list(
|
|
150
|
+
self,
|
|
151
|
+
*,
|
|
152
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
153
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
154
|
+
extra_headers: Headers | None = None,
|
|
155
|
+
extra_query: Query | None = None,
|
|
156
|
+
extra_body: Body | None = None,
|
|
157
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
158
|
+
) -> AssistanceListingListResponse:
|
|
159
|
+
"""API endpoint that allows Assistance Listing to be viewed."""
|
|
160
|
+
return await self._get(
|
|
161
|
+
"/api/assistance_listings/",
|
|
162
|
+
options=make_request_options(
|
|
163
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
164
|
+
),
|
|
165
|
+
cast_to=AssistanceListingListResponse,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
class AssistanceListingsResourceWithRawResponse:
|
|
170
|
+
def __init__(self, assistance_listings: AssistanceListingsResource) -> None:
|
|
171
|
+
self._assistance_listings = assistance_listings
|
|
172
|
+
|
|
173
|
+
self.retrieve = to_raw_response_wrapper(
|
|
174
|
+
assistance_listings.retrieve,
|
|
175
|
+
)
|
|
176
|
+
self.list = to_raw_response_wrapper(
|
|
177
|
+
assistance_listings.list,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class AsyncAssistanceListingsResourceWithRawResponse:
|
|
182
|
+
def __init__(self, assistance_listings: AsyncAssistanceListingsResource) -> None:
|
|
183
|
+
self._assistance_listings = assistance_listings
|
|
184
|
+
|
|
185
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
186
|
+
assistance_listings.retrieve,
|
|
187
|
+
)
|
|
188
|
+
self.list = async_to_raw_response_wrapper(
|
|
189
|
+
assistance_listings.list,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class AssistanceListingsResourceWithStreamingResponse:
|
|
194
|
+
def __init__(self, assistance_listings: AssistanceListingsResource) -> None:
|
|
195
|
+
self._assistance_listings = assistance_listings
|
|
196
|
+
|
|
197
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
198
|
+
assistance_listings.retrieve,
|
|
199
|
+
)
|
|
200
|
+
self.list = to_streamed_response_wrapper(
|
|
201
|
+
assistance_listings.list,
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
class AsyncAssistanceListingsResourceWithStreamingResponse:
|
|
206
|
+
def __init__(self, assistance_listings: AsyncAssistanceListingsResource) -> None:
|
|
207
|
+
self._assistance_listings = assistance_listings
|
|
208
|
+
|
|
209
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
210
|
+
assistance_listings.retrieve,
|
|
211
|
+
)
|
|
212
|
+
self.list = async_to_streamed_response_wrapper(
|
|
213
|
+
assistance_listings.list,
|
|
214
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .bulk import (
|
|
4
|
+
BulkResource,
|
|
5
|
+
AsyncBulkResource,
|
|
6
|
+
BulkResourceWithRawResponse,
|
|
7
|
+
AsyncBulkResourceWithRawResponse,
|
|
8
|
+
BulkResourceWithStreamingResponse,
|
|
9
|
+
AsyncBulkResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .entities import (
|
|
12
|
+
EntitiesResource,
|
|
13
|
+
AsyncEntitiesResource,
|
|
14
|
+
EntitiesResourceWithRawResponse,
|
|
15
|
+
AsyncEntitiesResourceWithRawResponse,
|
|
16
|
+
EntitiesResourceWithStreamingResponse,
|
|
17
|
+
AsyncEntitiesResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"EntitiesResource",
|
|
22
|
+
"AsyncEntitiesResource",
|
|
23
|
+
"EntitiesResourceWithRawResponse",
|
|
24
|
+
"AsyncEntitiesResourceWithRawResponse",
|
|
25
|
+
"EntitiesResourceWithStreamingResponse",
|
|
26
|
+
"AsyncEntitiesResourceWithStreamingResponse",
|
|
27
|
+
"BulkResource",
|
|
28
|
+
"AsyncBulkResource",
|
|
29
|
+
"BulkResourceWithRawResponse",
|
|
30
|
+
"AsyncBulkResourceWithRawResponse",
|
|
31
|
+
"BulkResourceWithStreamingResponse",
|
|
32
|
+
"AsyncBulkResourceWithStreamingResponse",
|
|
33
|
+
]
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .entities import (
|
|
6
|
+
EntitiesResource,
|
|
7
|
+
AsyncEntitiesResource,
|
|
8
|
+
EntitiesResourceWithRawResponse,
|
|
9
|
+
AsyncEntitiesResourceWithRawResponse,
|
|
10
|
+
EntitiesResourceWithStreamingResponse,
|
|
11
|
+
AsyncEntitiesResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from ..._compat import cached_property
|
|
14
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
|
|
16
|
+
__all__ = ["BulkResource", "AsyncBulkResource"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class BulkResource(SyncAPIResource):
|
|
20
|
+
@cached_property
|
|
21
|
+
def entities(self) -> EntitiesResource:
|
|
22
|
+
return EntitiesResource(self._client)
|
|
23
|
+
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> BulkResourceWithRawResponse:
|
|
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 BulkResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> BulkResourceWithStreamingResponse:
|
|
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 BulkResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AsyncBulkResource(AsyncAPIResource):
|
|
45
|
+
@cached_property
|
|
46
|
+
def entities(self) -> AsyncEntitiesResource:
|
|
47
|
+
return AsyncEntitiesResource(self._client)
|
|
48
|
+
|
|
49
|
+
@cached_property
|
|
50
|
+
def with_raw_response(self) -> AsyncBulkResourceWithRawResponse:
|
|
51
|
+
"""
|
|
52
|
+
This property can be used as a prefix for any HTTP method call to return the
|
|
53
|
+
the raw response object instead of the parsed content.
|
|
54
|
+
|
|
55
|
+
For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
|
|
56
|
+
"""
|
|
57
|
+
return AsyncBulkResourceWithRawResponse(self)
|
|
58
|
+
|
|
59
|
+
@cached_property
|
|
60
|
+
def with_streaming_response(self) -> AsyncBulkResourceWithStreamingResponse:
|
|
61
|
+
"""
|
|
62
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
63
|
+
|
|
64
|
+
For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
|
|
65
|
+
"""
|
|
66
|
+
return AsyncBulkResourceWithStreamingResponse(self)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class BulkResourceWithRawResponse:
|
|
70
|
+
def __init__(self, bulk: BulkResource) -> None:
|
|
71
|
+
self._bulk = bulk
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def entities(self) -> EntitiesResourceWithRawResponse:
|
|
75
|
+
return EntitiesResourceWithRawResponse(self._bulk.entities)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AsyncBulkResourceWithRawResponse:
|
|
79
|
+
def __init__(self, bulk: AsyncBulkResource) -> None:
|
|
80
|
+
self._bulk = bulk
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def entities(self) -> AsyncEntitiesResourceWithRawResponse:
|
|
84
|
+
return AsyncEntitiesResourceWithRawResponse(self._bulk.entities)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class BulkResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, bulk: BulkResource) -> None:
|
|
89
|
+
self._bulk = bulk
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def entities(self) -> EntitiesResourceWithStreamingResponse:
|
|
93
|
+
return EntitiesResourceWithStreamingResponse(self._bulk.entities)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncBulkResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, bulk: AsyncBulkResource) -> None:
|
|
98
|
+
self._bulk = bulk
|
|
99
|
+
|
|
100
|
+
@cached_property
|
|
101
|
+
def entities(self) -> AsyncEntitiesResourceWithStreamingResponse:
|
|
102
|
+
return AsyncEntitiesResourceWithStreamingResponse(self._bulk.entities)
|