tango-python 0.0.1a1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. tango/__init__.py +83 -0
  2. tango/_base_client.py +2045 -0
  3. tango/_client.py +544 -0
  4. tango/_compat.py +219 -0
  5. tango/_constants.py +14 -0
  6. tango/_exceptions.py +108 -0
  7. tango/_files.py +123 -0
  8. tango/_models.py +788 -0
  9. tango/_qs.py +150 -0
  10. tango/_resource.py +43 -0
  11. tango/_response.py +824 -0
  12. tango/_streaming.py +333 -0
  13. tango/_types.py +219 -0
  14. tango/_utils/__init__.py +56 -0
  15. tango/_utils/_logs.py +25 -0
  16. tango/_utils/_proxy.py +62 -0
  17. tango/_utils/_reflection.py +42 -0
  18. tango/_utils/_streams.py +12 -0
  19. tango/_utils/_sync.py +71 -0
  20. tango/_utils/_transform.py +392 -0
  21. tango/_utils/_typing.py +120 -0
  22. tango/_utils/_utils.py +414 -0
  23. tango/_version.py +4 -0
  24. tango/lib/.keep +4 -0
  25. tango/py.typed +0 -0
  26. tango/resources/__init__.py +229 -0
  27. tango/resources/agencies.py +255 -0
  28. tango/resources/assistance_listings.py +214 -0
  29. tango/resources/bulk/__init__.py +33 -0
  30. tango/resources/bulk/bulk.py +102 -0
  31. tango/resources/bulk/entities.py +152 -0
  32. tango/resources/business_types.py +218 -0
  33. tango/resources/contracts.py +381 -0
  34. tango/resources/departments.py +210 -0
  35. tango/resources/entities.py +325 -0
  36. tango/resources/idvs/__init__.py +33 -0
  37. tango/resources/idvs/awards.py +287 -0
  38. tango/resources/idvs/idvs.py +413 -0
  39. tango/resources/naics.py +317 -0
  40. tango/resources/notices.py +391 -0
  41. tango/resources/offices.py +281 -0
  42. tango/resources/opportunities.py +420 -0
  43. tango/resources/pscs.py +210 -0
  44. tango/resources/schemas.py +398 -0
  45. tango/resources/subawards.py +313 -0
  46. tango/resources/versions.py +136 -0
  47. tango/types/__init__.py +43 -0
  48. tango/types/agency.py +17 -0
  49. tango/types/agency_list_params.py +14 -0
  50. tango/types/agency_list_response.py +10 -0
  51. tango/types/assistance_listing.py +12 -0
  52. tango/types/assistance_listing_list_response.py +10 -0
  53. tango/types/assistance_listing_retrieve_response.py +26 -0
  54. tango/types/bulk/__init__.py +3 -0
  55. tango/types/business_type.py +14 -0
  56. tango/types/business_type_list_response.py +10 -0
  57. tango/types/contract_list_params.py +78 -0
  58. tango/types/contract_list_response.py +55 -0
  59. tango/types/contract_retrieve_response.py +51 -0
  60. tango/types/department.py +16 -0
  61. tango/types/department_list_response.py +10 -0
  62. tango/types/entity_list_params.py +38 -0
  63. tango/types/entity_list_response.py +37 -0
  64. tango/types/entity_retrieve_response.py +116 -0
  65. tango/types/idv.py +102 -0
  66. tango/types/idv_list_params.py +78 -0
  67. tango/types/idv_list_response.py +27 -0
  68. tango/types/idvs/__init__.py +6 -0
  69. tango/types/idvs/award_list_params.py +55 -0
  70. tango/types/idvs/award_list_response.py +55 -0
  71. tango/types/naic_list_params.py +47 -0
  72. tango/types/naic_list_response.py +10 -0
  73. tango/types/naic_retrieve_response.py +13 -0
  74. tango/types/naics_code.py +13 -0
  75. tango/types/notice_list_params.py +81 -0
  76. tango/types/notice_list_response.py +60 -0
  77. tango/types/notice_retrieve_response.py +93 -0
  78. tango/types/office.py +15 -0
  79. tango/types/office_list_params.py +18 -0
  80. tango/types/office_list_response.py +18 -0
  81. tango/types/opportunity_list_params.py +97 -0
  82. tango/types/opportunity_list_response.py +101 -0
  83. tango/types/opportunity_retrieve_response.py +123 -0
  84. tango/types/product_service_code.py +21 -0
  85. tango/types/psc_list_response.py +10 -0
  86. tango/types/schema_retrieve_params.py +113 -0
  87. tango/types/schema_retrieve_response.py +8 -0
  88. tango/types/subaward.py +172 -0
  89. tango/types/subaward_list_params.py +33 -0
  90. tango/types/subaward_list_response.py +18 -0
  91. tango_python-0.0.1a1.dist-info/METADATA +359 -0
  92. tango_python-0.0.1a1.dist-info/RECORD +94 -0
  93. tango_python-0.0.1a1.dist-info/WHEEL +4 -0
  94. tango_python-0.0.1a1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,398 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal
6
+
7
+ import httpx
8
+
9
+ from ..types import schema_retrieve_params
10
+ from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
+ from .._utils import (
12
+ maybe_transform,
13
+ async_maybe_transform,
14
+ )
15
+ from .._compat import cached_property
16
+ from .._resource import SyncAPIResource, AsyncAPIResource
17
+ from .._response import (
18
+ to_raw_response_wrapper,
19
+ to_streamed_response_wrapper,
20
+ async_to_raw_response_wrapper,
21
+ async_to_streamed_response_wrapper,
22
+ )
23
+ from .._base_client import make_request_options
24
+ from ..types.schema_retrieve_response import SchemaRetrieveResponse
25
+
26
+ __all__ = ["SchemasResource", "AsyncSchemasResource"]
27
+
28
+
29
+ class SchemasResource(SyncAPIResource):
30
+ @cached_property
31
+ def with_raw_response(self) -> SchemasResourceWithRawResponse:
32
+ """
33
+ This property can be used as a prefix for any HTTP method call to return the
34
+ the raw response object instead of the parsed content.
35
+
36
+ For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
37
+ """
38
+ return SchemasResourceWithRawResponse(self)
39
+
40
+ @cached_property
41
+ def with_streaming_response(self) -> SchemasResourceWithStreamingResponse:
42
+ """
43
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
44
+
45
+ For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
46
+ """
47
+ return SchemasResourceWithStreamingResponse(self)
48
+
49
+ def retrieve(
50
+ self,
51
+ *,
52
+ format: Literal["json", "yaml"] | NotGiven = NOT_GIVEN,
53
+ lang: Literal[
54
+ "af",
55
+ "ar",
56
+ "ar-dz",
57
+ "ast",
58
+ "az",
59
+ "be",
60
+ "bg",
61
+ "bn",
62
+ "br",
63
+ "bs",
64
+ "ca",
65
+ "ckb",
66
+ "cs",
67
+ "cy",
68
+ "da",
69
+ "de",
70
+ "dsb",
71
+ "el",
72
+ "en",
73
+ "en-au",
74
+ "en-gb",
75
+ "eo",
76
+ "es",
77
+ "es-ar",
78
+ "es-co",
79
+ "es-mx",
80
+ "es-ni",
81
+ "es-ve",
82
+ "et",
83
+ "eu",
84
+ "fa",
85
+ "fi",
86
+ "fr",
87
+ "fy",
88
+ "ga",
89
+ "gd",
90
+ "gl",
91
+ "he",
92
+ "hi",
93
+ "hr",
94
+ "hsb",
95
+ "hu",
96
+ "hy",
97
+ "ia",
98
+ "id",
99
+ "ig",
100
+ "io",
101
+ "is",
102
+ "it",
103
+ "ja",
104
+ "ka",
105
+ "kab",
106
+ "kk",
107
+ "km",
108
+ "kn",
109
+ "ko",
110
+ "ky",
111
+ "lb",
112
+ "lt",
113
+ "lv",
114
+ "mk",
115
+ "ml",
116
+ "mn",
117
+ "mr",
118
+ "ms",
119
+ "my",
120
+ "nb",
121
+ "ne",
122
+ "nl",
123
+ "nn",
124
+ "os",
125
+ "pa",
126
+ "pl",
127
+ "pt",
128
+ "pt-br",
129
+ "ro",
130
+ "ru",
131
+ "sk",
132
+ "sl",
133
+ "sq",
134
+ "sr",
135
+ "sr-latn",
136
+ "sv",
137
+ "sw",
138
+ "ta",
139
+ "te",
140
+ "tg",
141
+ "th",
142
+ "tk",
143
+ "tr",
144
+ "tt",
145
+ "udm",
146
+ "ug",
147
+ "uk",
148
+ "ur",
149
+ "uz",
150
+ "vi",
151
+ "zh-hans",
152
+ "zh-hant",
153
+ ]
154
+ | NotGiven = NOT_GIVEN,
155
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
156
+ # The extra values given here take precedence over values defined on the client or passed to this method.
157
+ extra_headers: Headers | None = None,
158
+ extra_query: Query | None = None,
159
+ extra_body: Body | None = None,
160
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
161
+ ) -> SchemaRetrieveResponse:
162
+ """OpenApi3 schema for this API.
163
+
164
+ Format can be selected via content negotiation.
165
+
166
+ - YAML: application/vnd.oai.openapi
167
+ - JSON: application/vnd.oai.openapi+json
168
+
169
+ Args:
170
+ extra_headers: Send extra headers
171
+
172
+ extra_query: Add additional query parameters to the request
173
+
174
+ extra_body: Add additional JSON properties to the request
175
+
176
+ timeout: Override the client-level default timeout for this request, in seconds
177
+ """
178
+ return self._get(
179
+ "/api/schema/",
180
+ options=make_request_options(
181
+ extra_headers=extra_headers,
182
+ extra_query=extra_query,
183
+ extra_body=extra_body,
184
+ timeout=timeout,
185
+ query=maybe_transform(
186
+ {
187
+ "format": format,
188
+ "lang": lang,
189
+ },
190
+ schema_retrieve_params.SchemaRetrieveParams,
191
+ ),
192
+ ),
193
+ cast_to=SchemaRetrieveResponse,
194
+ )
195
+
196
+
197
+ class AsyncSchemasResource(AsyncAPIResource):
198
+ @cached_property
199
+ def with_raw_response(self) -> AsyncSchemasResourceWithRawResponse:
200
+ """
201
+ This property can be used as a prefix for any HTTP method call to return the
202
+ the raw response object instead of the parsed content.
203
+
204
+ For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
205
+ """
206
+ return AsyncSchemasResourceWithRawResponse(self)
207
+
208
+ @cached_property
209
+ def with_streaming_response(self) -> AsyncSchemasResourceWithStreamingResponse:
210
+ """
211
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
212
+
213
+ For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
214
+ """
215
+ return AsyncSchemasResourceWithStreamingResponse(self)
216
+
217
+ async def retrieve(
218
+ self,
219
+ *,
220
+ format: Literal["json", "yaml"] | NotGiven = NOT_GIVEN,
221
+ lang: Literal[
222
+ "af",
223
+ "ar",
224
+ "ar-dz",
225
+ "ast",
226
+ "az",
227
+ "be",
228
+ "bg",
229
+ "bn",
230
+ "br",
231
+ "bs",
232
+ "ca",
233
+ "ckb",
234
+ "cs",
235
+ "cy",
236
+ "da",
237
+ "de",
238
+ "dsb",
239
+ "el",
240
+ "en",
241
+ "en-au",
242
+ "en-gb",
243
+ "eo",
244
+ "es",
245
+ "es-ar",
246
+ "es-co",
247
+ "es-mx",
248
+ "es-ni",
249
+ "es-ve",
250
+ "et",
251
+ "eu",
252
+ "fa",
253
+ "fi",
254
+ "fr",
255
+ "fy",
256
+ "ga",
257
+ "gd",
258
+ "gl",
259
+ "he",
260
+ "hi",
261
+ "hr",
262
+ "hsb",
263
+ "hu",
264
+ "hy",
265
+ "ia",
266
+ "id",
267
+ "ig",
268
+ "io",
269
+ "is",
270
+ "it",
271
+ "ja",
272
+ "ka",
273
+ "kab",
274
+ "kk",
275
+ "km",
276
+ "kn",
277
+ "ko",
278
+ "ky",
279
+ "lb",
280
+ "lt",
281
+ "lv",
282
+ "mk",
283
+ "ml",
284
+ "mn",
285
+ "mr",
286
+ "ms",
287
+ "my",
288
+ "nb",
289
+ "ne",
290
+ "nl",
291
+ "nn",
292
+ "os",
293
+ "pa",
294
+ "pl",
295
+ "pt",
296
+ "pt-br",
297
+ "ro",
298
+ "ru",
299
+ "sk",
300
+ "sl",
301
+ "sq",
302
+ "sr",
303
+ "sr-latn",
304
+ "sv",
305
+ "sw",
306
+ "ta",
307
+ "te",
308
+ "tg",
309
+ "th",
310
+ "tk",
311
+ "tr",
312
+ "tt",
313
+ "udm",
314
+ "ug",
315
+ "uk",
316
+ "ur",
317
+ "uz",
318
+ "vi",
319
+ "zh-hans",
320
+ "zh-hant",
321
+ ]
322
+ | NotGiven = NOT_GIVEN,
323
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
324
+ # The extra values given here take precedence over values defined on the client or passed to this method.
325
+ extra_headers: Headers | None = None,
326
+ extra_query: Query | None = None,
327
+ extra_body: Body | None = None,
328
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
329
+ ) -> SchemaRetrieveResponse:
330
+ """OpenApi3 schema for this API.
331
+
332
+ Format can be selected via content negotiation.
333
+
334
+ - YAML: application/vnd.oai.openapi
335
+ - JSON: application/vnd.oai.openapi+json
336
+
337
+ Args:
338
+ extra_headers: Send extra headers
339
+
340
+ extra_query: Add additional query parameters to the request
341
+
342
+ extra_body: Add additional JSON properties to the request
343
+
344
+ timeout: Override the client-level default timeout for this request, in seconds
345
+ """
346
+ return await self._get(
347
+ "/api/schema/",
348
+ options=make_request_options(
349
+ extra_headers=extra_headers,
350
+ extra_query=extra_query,
351
+ extra_body=extra_body,
352
+ timeout=timeout,
353
+ query=await async_maybe_transform(
354
+ {
355
+ "format": format,
356
+ "lang": lang,
357
+ },
358
+ schema_retrieve_params.SchemaRetrieveParams,
359
+ ),
360
+ ),
361
+ cast_to=SchemaRetrieveResponse,
362
+ )
363
+
364
+
365
+ class SchemasResourceWithRawResponse:
366
+ def __init__(self, schemas: SchemasResource) -> None:
367
+ self._schemas = schemas
368
+
369
+ self.retrieve = to_raw_response_wrapper(
370
+ schemas.retrieve,
371
+ )
372
+
373
+
374
+ class AsyncSchemasResourceWithRawResponse:
375
+ def __init__(self, schemas: AsyncSchemasResource) -> None:
376
+ self._schemas = schemas
377
+
378
+ self.retrieve = async_to_raw_response_wrapper(
379
+ schemas.retrieve,
380
+ )
381
+
382
+
383
+ class SchemasResourceWithStreamingResponse:
384
+ def __init__(self, schemas: SchemasResource) -> None:
385
+ self._schemas = schemas
386
+
387
+ self.retrieve = to_streamed_response_wrapper(
388
+ schemas.retrieve,
389
+ )
390
+
391
+
392
+ class AsyncSchemasResourceWithStreamingResponse:
393
+ def __init__(self, schemas: AsyncSchemasResource) -> None:
394
+ self._schemas = schemas
395
+
396
+ self.retrieve = async_to_streamed_response_wrapper(
397
+ schemas.retrieve,
398
+ )
@@ -0,0 +1,313 @@
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 subaward_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.subaward import Subaward
23
+ from ..types.subaward_list_response import SubawardListResponse
24
+
25
+ __all__ = ["SubawardsResource", "AsyncSubawardsResource"]
26
+
27
+
28
+ class SubawardsResource(SyncAPIResource):
29
+ @cached_property
30
+ def with_raw_response(self) -> SubawardsResourceWithRawResponse:
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 SubawardsResourceWithRawResponse(self)
38
+
39
+ @cached_property
40
+ def with_streaming_response(self) -> SubawardsResourceWithStreamingResponse:
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 SubawardsResourceWithStreamingResponse(self)
47
+
48
+ def retrieve(
49
+ self,
50
+ id: int,
51
+ *,
52
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
53
+ # The extra values given here take precedence over values defined on the client or passed to this method.
54
+ extra_headers: Headers | None = None,
55
+ extra_query: Query | None = None,
56
+ extra_body: Body | None = None,
57
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
58
+ ) -> Subaward:
59
+ """
60
+ API endpoint that allows subaward lookup.
61
+
62
+ Args:
63
+ extra_headers: Send extra headers
64
+
65
+ extra_query: Add additional query parameters to the request
66
+
67
+ extra_body: Add additional JSON properties to the request
68
+
69
+ timeout: Override the client-level default timeout for this request, in seconds
70
+ """
71
+ return self._get(
72
+ f"/api/subawards/{id}/",
73
+ options=make_request_options(
74
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
75
+ ),
76
+ cast_to=Subaward,
77
+ )
78
+
79
+ def list(
80
+ self,
81
+ *,
82
+ awarding_agency: str | NotGiven = NOT_GIVEN,
83
+ fiscal_year: int | NotGiven = NOT_GIVEN,
84
+ fiscal_year_gte: int | NotGiven = NOT_GIVEN,
85
+ fiscal_year_lte: int | NotGiven = NOT_GIVEN,
86
+ funding_agency: str | NotGiven = NOT_GIVEN,
87
+ limit: int | NotGiven = NOT_GIVEN,
88
+ page: int | NotGiven = NOT_GIVEN,
89
+ prime_uei: str | NotGiven = NOT_GIVEN,
90
+ sub_uei: str | NotGiven = NOT_GIVEN,
91
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
92
+ # The extra values given here take precedence over values defined on the client or passed to this method.
93
+ extra_headers: Headers | None = None,
94
+ extra_query: Query | None = None,
95
+ extra_body: Body | None = None,
96
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
97
+ ) -> SubawardListResponse:
98
+ """
99
+ API endpoint that allows subaward lookup.
100
+
101
+ Args:
102
+ awarding_agency: Awarding agency code
103
+
104
+ funding_agency: Awarding agency code
105
+
106
+ limit: Number of results to return per page.
107
+
108
+ page: A page number within the paginated result set.
109
+
110
+ prime_uei: Unique Entity Identifier
111
+
112
+ sub_uei: Unique Entity Identifier
113
+
114
+ extra_headers: Send extra headers
115
+
116
+ extra_query: Add additional query parameters to the request
117
+
118
+ extra_body: Add additional JSON properties to the request
119
+
120
+ timeout: Override the client-level default timeout for this request, in seconds
121
+ """
122
+ return self._get(
123
+ "/api/subawards/",
124
+ options=make_request_options(
125
+ extra_headers=extra_headers,
126
+ extra_query=extra_query,
127
+ extra_body=extra_body,
128
+ timeout=timeout,
129
+ query=maybe_transform(
130
+ {
131
+ "awarding_agency": awarding_agency,
132
+ "fiscal_year": fiscal_year,
133
+ "fiscal_year_gte": fiscal_year_gte,
134
+ "fiscal_year_lte": fiscal_year_lte,
135
+ "funding_agency": funding_agency,
136
+ "limit": limit,
137
+ "page": page,
138
+ "prime_uei": prime_uei,
139
+ "sub_uei": sub_uei,
140
+ },
141
+ subaward_list_params.SubawardListParams,
142
+ ),
143
+ ),
144
+ cast_to=SubawardListResponse,
145
+ )
146
+
147
+
148
+ class AsyncSubawardsResource(AsyncAPIResource):
149
+ @cached_property
150
+ def with_raw_response(self) -> AsyncSubawardsResourceWithRawResponse:
151
+ """
152
+ This property can be used as a prefix for any HTTP method call to return the
153
+ the raw response object instead of the parsed content.
154
+
155
+ For more information, see https://www.github.com/makegov/tango-python#accessing-raw-response-data-eg-headers
156
+ """
157
+ return AsyncSubawardsResourceWithRawResponse(self)
158
+
159
+ @cached_property
160
+ def with_streaming_response(self) -> AsyncSubawardsResourceWithStreamingResponse:
161
+ """
162
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
163
+
164
+ For more information, see https://www.github.com/makegov/tango-python#with_streaming_response
165
+ """
166
+ return AsyncSubawardsResourceWithStreamingResponse(self)
167
+
168
+ async def retrieve(
169
+ self,
170
+ id: int,
171
+ *,
172
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
173
+ # The extra values given here take precedence over values defined on the client or passed to this method.
174
+ extra_headers: Headers | None = None,
175
+ extra_query: Query | None = None,
176
+ extra_body: Body | None = None,
177
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
178
+ ) -> Subaward:
179
+ """
180
+ API endpoint that allows subaward lookup.
181
+
182
+ Args:
183
+ extra_headers: Send extra headers
184
+
185
+ extra_query: Add additional query parameters to the request
186
+
187
+ extra_body: Add additional JSON properties to the request
188
+
189
+ timeout: Override the client-level default timeout for this request, in seconds
190
+ """
191
+ return await self._get(
192
+ f"/api/subawards/{id}/",
193
+ options=make_request_options(
194
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
195
+ ),
196
+ cast_to=Subaward,
197
+ )
198
+
199
+ async def list(
200
+ self,
201
+ *,
202
+ awarding_agency: str | NotGiven = NOT_GIVEN,
203
+ fiscal_year: int | NotGiven = NOT_GIVEN,
204
+ fiscal_year_gte: int | NotGiven = NOT_GIVEN,
205
+ fiscal_year_lte: int | NotGiven = NOT_GIVEN,
206
+ funding_agency: str | NotGiven = NOT_GIVEN,
207
+ limit: int | NotGiven = NOT_GIVEN,
208
+ page: int | NotGiven = NOT_GIVEN,
209
+ prime_uei: str | NotGiven = NOT_GIVEN,
210
+ sub_uei: str | NotGiven = NOT_GIVEN,
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
+ ) -> SubawardListResponse:
218
+ """
219
+ API endpoint that allows subaward lookup.
220
+
221
+ Args:
222
+ awarding_agency: Awarding agency code
223
+
224
+ funding_agency: Awarding agency code
225
+
226
+ limit: Number of results to return per page.
227
+
228
+ page: A page number within the paginated result set.
229
+
230
+ prime_uei: Unique Entity Identifier
231
+
232
+ sub_uei: Unique Entity Identifier
233
+
234
+ extra_headers: Send extra headers
235
+
236
+ extra_query: Add additional query parameters to the request
237
+
238
+ extra_body: Add additional JSON properties to the request
239
+
240
+ timeout: Override the client-level default timeout for this request, in seconds
241
+ """
242
+ return await self._get(
243
+ "/api/subawards/",
244
+ options=make_request_options(
245
+ extra_headers=extra_headers,
246
+ extra_query=extra_query,
247
+ extra_body=extra_body,
248
+ timeout=timeout,
249
+ query=await async_maybe_transform(
250
+ {
251
+ "awarding_agency": awarding_agency,
252
+ "fiscal_year": fiscal_year,
253
+ "fiscal_year_gte": fiscal_year_gte,
254
+ "fiscal_year_lte": fiscal_year_lte,
255
+ "funding_agency": funding_agency,
256
+ "limit": limit,
257
+ "page": page,
258
+ "prime_uei": prime_uei,
259
+ "sub_uei": sub_uei,
260
+ },
261
+ subaward_list_params.SubawardListParams,
262
+ ),
263
+ ),
264
+ cast_to=SubawardListResponse,
265
+ )
266
+
267
+
268
+ class SubawardsResourceWithRawResponse:
269
+ def __init__(self, subawards: SubawardsResource) -> None:
270
+ self._subawards = subawards
271
+
272
+ self.retrieve = to_raw_response_wrapper(
273
+ subawards.retrieve,
274
+ )
275
+ self.list = to_raw_response_wrapper(
276
+ subawards.list,
277
+ )
278
+
279
+
280
+ class AsyncSubawardsResourceWithRawResponse:
281
+ def __init__(self, subawards: AsyncSubawardsResource) -> None:
282
+ self._subawards = subawards
283
+
284
+ self.retrieve = async_to_raw_response_wrapper(
285
+ subawards.retrieve,
286
+ )
287
+ self.list = async_to_raw_response_wrapper(
288
+ subawards.list,
289
+ )
290
+
291
+
292
+ class SubawardsResourceWithStreamingResponse:
293
+ def __init__(self, subawards: SubawardsResource) -> None:
294
+ self._subawards = subawards
295
+
296
+ self.retrieve = to_streamed_response_wrapper(
297
+ subawards.retrieve,
298
+ )
299
+ self.list = to_streamed_response_wrapper(
300
+ subawards.list,
301
+ )
302
+
303
+
304
+ class AsyncSubawardsResourceWithStreamingResponse:
305
+ def __init__(self, subawards: AsyncSubawardsResource) -> None:
306
+ self._subawards = subawards
307
+
308
+ self.retrieve = async_to_streamed_response_wrapper(
309
+ subawards.retrieve,
310
+ )
311
+ self.list = async_to_streamed_response_wrapper(
312
+ subawards.list,
313
+ )