profound 0.1.0__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.
Potentially problematic release.
This version of profound might be problematic. Click here for more details.
- profound/__init__.py +102 -0
- profound/_base_client.py +1995 -0
- profound/_client.py +448 -0
- profound/_compat.py +219 -0
- profound/_constants.py +14 -0
- profound/_exceptions.py +108 -0
- profound/_files.py +123 -0
- profound/_models.py +835 -0
- profound/_qs.py +150 -0
- profound/_resource.py +43 -0
- profound/_response.py +830 -0
- profound/_streaming.py +333 -0
- profound/_types.py +260 -0
- profound/_utils/__init__.py +64 -0
- profound/_utils/_compat.py +45 -0
- profound/_utils/_datetime_parse.py +136 -0
- profound/_utils/_logs.py +25 -0
- profound/_utils/_proxy.py +65 -0
- profound/_utils/_reflection.py +42 -0
- profound/_utils/_resources_proxy.py +24 -0
- profound/_utils/_streams.py +12 -0
- profound/_utils/_sync.py +86 -0
- profound/_utils/_transform.py +457 -0
- profound/_utils/_typing.py +156 -0
- profound/_utils/_utils.py +421 -0
- profound/_version.py +4 -0
- profound/lib/.keep +4 -0
- profound/py.typed +0 -0
- profound/resources/__init__.py +61 -0
- profound/resources/logs/__init__.py +33 -0
- profound/resources/logs/logs.py +102 -0
- profound/resources/logs/raw.py +511 -0
- profound/resources/organizations/__init__.py +33 -0
- profound/resources/organizations/categories.py +372 -0
- profound/resources/organizations/organizations.py +269 -0
- profound/resources/prompts.py +201 -0
- profound/resources/reports.py +609 -0
- profound/types/__init__.py +17 -0
- profound/types/info.py +13 -0
- profound/types/logs/__init__.py +8 -0
- profound/types/logs/raw_bots_params.py +111 -0
- profound/types/logs/raw_bots_response.py +45 -0
- profound/types/logs/raw_logs_params.py +99 -0
- profound/types/logs/raw_logs_response.py +39 -0
- profound/types/organization_domains_response.py +20 -0
- profound/types/organization_models_response.py +10 -0
- profound/types/organization_regions_response.py +10 -0
- profound/types/organizations/__init__.py +9 -0
- profound/types/organizations/category_list_response.py +10 -0
- profound/types/organizations/category_prompts_response.py +31 -0
- profound/types/organizations/category_tags_response.py +10 -0
- profound/types/organizations/category_topics_response.py +10 -0
- profound/types/organizations/org_item.py +11 -0
- profound/types/pagination_param.py +15 -0
- profound/types/prompt_answers_params.py +82 -0
- profound/types/prompt_answers_response.py +44 -0
- profound/types/report_citations_params.py +83 -0
- profound/types/report_citations_response.py +16 -0
- profound/types/report_sentiment_params.py +83 -0
- profound/types/report_visibility_params.py +83 -0
- profound/types/response.py +16 -0
- profound/types/result.py +13 -0
- profound-0.1.0.dist-info/METADATA +415 -0
- profound-0.1.0.dist-info/RECORD +66 -0
- profound-0.1.0.dist-info/WHEEL +4 -0
- profound-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,372 @@
|
|
|
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 Body, Query, Headers, NotGiven, not_given
|
|
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.organizations.category_list_response import CategoryListResponse
|
|
18
|
+
from ...types.organizations.category_tags_response import CategoryTagsResponse
|
|
19
|
+
from ...types.organizations.category_topics_response import CategoryTopicsResponse
|
|
20
|
+
from ...types.organizations.category_prompts_response import CategoryPromptsResponse
|
|
21
|
+
|
|
22
|
+
__all__ = ["CategoriesResource", "AsyncCategoriesResource"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class CategoriesResource(SyncAPIResource):
|
|
26
|
+
@cached_property
|
|
27
|
+
def with_raw_response(self) -> CategoriesResourceWithRawResponse:
|
|
28
|
+
"""
|
|
29
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
30
|
+
the raw response object instead of the parsed content.
|
|
31
|
+
|
|
32
|
+
For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#accessing-raw-response-data-eg-headers
|
|
33
|
+
"""
|
|
34
|
+
return CategoriesResourceWithRawResponse(self)
|
|
35
|
+
|
|
36
|
+
@cached_property
|
|
37
|
+
def with_streaming_response(self) -> CategoriesResourceWithStreamingResponse:
|
|
38
|
+
"""
|
|
39
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
40
|
+
|
|
41
|
+
For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#with_streaming_response
|
|
42
|
+
"""
|
|
43
|
+
return CategoriesResourceWithStreamingResponse(self)
|
|
44
|
+
|
|
45
|
+
def list(
|
|
46
|
+
self,
|
|
47
|
+
*,
|
|
48
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
49
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
50
|
+
extra_headers: Headers | None = None,
|
|
51
|
+
extra_query: Query | None = None,
|
|
52
|
+
extra_body: Body | None = None,
|
|
53
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
54
|
+
) -> CategoryListResponse:
|
|
55
|
+
"""Get the organization categories."""
|
|
56
|
+
return self._get(
|
|
57
|
+
"/v1/org/categories",
|
|
58
|
+
options=make_request_options(
|
|
59
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
60
|
+
),
|
|
61
|
+
cast_to=CategoryListResponse,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
def prompts(
|
|
65
|
+
self,
|
|
66
|
+
category_id: str,
|
|
67
|
+
*,
|
|
68
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
69
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
70
|
+
extra_headers: Headers | None = None,
|
|
71
|
+
extra_query: Query | None = None,
|
|
72
|
+
extra_body: Body | None = None,
|
|
73
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
74
|
+
) -> CategoryPromptsResponse:
|
|
75
|
+
"""
|
|
76
|
+
Get Category Prompts
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
extra_headers: Send extra headers
|
|
80
|
+
|
|
81
|
+
extra_query: Add additional query parameters to the request
|
|
82
|
+
|
|
83
|
+
extra_body: Add additional JSON properties to the request
|
|
84
|
+
|
|
85
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
86
|
+
"""
|
|
87
|
+
if not category_id:
|
|
88
|
+
raise ValueError(f"Expected a non-empty value for `category_id` but received {category_id!r}")
|
|
89
|
+
return self._get(
|
|
90
|
+
f"/v1/org/categories/{category_id}/prompts",
|
|
91
|
+
options=make_request_options(
|
|
92
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
93
|
+
),
|
|
94
|
+
cast_to=CategoryPromptsResponse,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
def tags(
|
|
98
|
+
self,
|
|
99
|
+
category_id: str,
|
|
100
|
+
*,
|
|
101
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
102
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
103
|
+
extra_headers: Headers | None = None,
|
|
104
|
+
extra_query: Query | None = None,
|
|
105
|
+
extra_body: Body | None = None,
|
|
106
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
107
|
+
) -> CategoryTagsResponse:
|
|
108
|
+
"""
|
|
109
|
+
Get the organization tags for a specific category.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
extra_headers: Send extra headers
|
|
113
|
+
|
|
114
|
+
extra_query: Add additional query parameters to the request
|
|
115
|
+
|
|
116
|
+
extra_body: Add additional JSON properties to the request
|
|
117
|
+
|
|
118
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
119
|
+
"""
|
|
120
|
+
if not category_id:
|
|
121
|
+
raise ValueError(f"Expected a non-empty value for `category_id` but received {category_id!r}")
|
|
122
|
+
return self._get(
|
|
123
|
+
f"/v1/org/categories/{category_id}/tags",
|
|
124
|
+
options=make_request_options(
|
|
125
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
126
|
+
),
|
|
127
|
+
cast_to=CategoryTagsResponse,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
def topics(
|
|
131
|
+
self,
|
|
132
|
+
category_id: str,
|
|
133
|
+
*,
|
|
134
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
135
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
136
|
+
extra_headers: Headers | None = None,
|
|
137
|
+
extra_query: Query | None = None,
|
|
138
|
+
extra_body: Body | None = None,
|
|
139
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
140
|
+
) -> CategoryTopicsResponse:
|
|
141
|
+
"""
|
|
142
|
+
Get the organization categories.
|
|
143
|
+
|
|
144
|
+
Args:
|
|
145
|
+
extra_headers: Send extra headers
|
|
146
|
+
|
|
147
|
+
extra_query: Add additional query parameters to the request
|
|
148
|
+
|
|
149
|
+
extra_body: Add additional JSON properties to the request
|
|
150
|
+
|
|
151
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
152
|
+
"""
|
|
153
|
+
if not category_id:
|
|
154
|
+
raise ValueError(f"Expected a non-empty value for `category_id` but received {category_id!r}")
|
|
155
|
+
return self._get(
|
|
156
|
+
f"/v1/org/categories/{category_id}/topics",
|
|
157
|
+
options=make_request_options(
|
|
158
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
159
|
+
),
|
|
160
|
+
cast_to=CategoryTopicsResponse,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class AsyncCategoriesResource(AsyncAPIResource):
|
|
165
|
+
@cached_property
|
|
166
|
+
def with_raw_response(self) -> AsyncCategoriesResourceWithRawResponse:
|
|
167
|
+
"""
|
|
168
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
169
|
+
the raw response object instead of the parsed content.
|
|
170
|
+
|
|
171
|
+
For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#accessing-raw-response-data-eg-headers
|
|
172
|
+
"""
|
|
173
|
+
return AsyncCategoriesResourceWithRawResponse(self)
|
|
174
|
+
|
|
175
|
+
@cached_property
|
|
176
|
+
def with_streaming_response(self) -> AsyncCategoriesResourceWithStreamingResponse:
|
|
177
|
+
"""
|
|
178
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
179
|
+
|
|
180
|
+
For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#with_streaming_response
|
|
181
|
+
"""
|
|
182
|
+
return AsyncCategoriesResourceWithStreamingResponse(self)
|
|
183
|
+
|
|
184
|
+
async def list(
|
|
185
|
+
self,
|
|
186
|
+
*,
|
|
187
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
188
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
189
|
+
extra_headers: Headers | None = None,
|
|
190
|
+
extra_query: Query | None = None,
|
|
191
|
+
extra_body: Body | None = None,
|
|
192
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
193
|
+
) -> CategoryListResponse:
|
|
194
|
+
"""Get the organization categories."""
|
|
195
|
+
return await self._get(
|
|
196
|
+
"/v1/org/categories",
|
|
197
|
+
options=make_request_options(
|
|
198
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
199
|
+
),
|
|
200
|
+
cast_to=CategoryListResponse,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
async def prompts(
|
|
204
|
+
self,
|
|
205
|
+
category_id: str,
|
|
206
|
+
*,
|
|
207
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
208
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
209
|
+
extra_headers: Headers | None = None,
|
|
210
|
+
extra_query: Query | None = None,
|
|
211
|
+
extra_body: Body | None = None,
|
|
212
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
213
|
+
) -> CategoryPromptsResponse:
|
|
214
|
+
"""
|
|
215
|
+
Get Category Prompts
|
|
216
|
+
|
|
217
|
+
Args:
|
|
218
|
+
extra_headers: Send extra headers
|
|
219
|
+
|
|
220
|
+
extra_query: Add additional query parameters to the request
|
|
221
|
+
|
|
222
|
+
extra_body: Add additional JSON properties to the request
|
|
223
|
+
|
|
224
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
225
|
+
"""
|
|
226
|
+
if not category_id:
|
|
227
|
+
raise ValueError(f"Expected a non-empty value for `category_id` but received {category_id!r}")
|
|
228
|
+
return await self._get(
|
|
229
|
+
f"/v1/org/categories/{category_id}/prompts",
|
|
230
|
+
options=make_request_options(
|
|
231
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
232
|
+
),
|
|
233
|
+
cast_to=CategoryPromptsResponse,
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
async def tags(
|
|
237
|
+
self,
|
|
238
|
+
category_id: str,
|
|
239
|
+
*,
|
|
240
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
241
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
242
|
+
extra_headers: Headers | None = None,
|
|
243
|
+
extra_query: Query | None = None,
|
|
244
|
+
extra_body: Body | None = None,
|
|
245
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
246
|
+
) -> CategoryTagsResponse:
|
|
247
|
+
"""
|
|
248
|
+
Get the organization tags for a specific category.
|
|
249
|
+
|
|
250
|
+
Args:
|
|
251
|
+
extra_headers: Send extra headers
|
|
252
|
+
|
|
253
|
+
extra_query: Add additional query parameters to the request
|
|
254
|
+
|
|
255
|
+
extra_body: Add additional JSON properties to the request
|
|
256
|
+
|
|
257
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
258
|
+
"""
|
|
259
|
+
if not category_id:
|
|
260
|
+
raise ValueError(f"Expected a non-empty value for `category_id` but received {category_id!r}")
|
|
261
|
+
return await self._get(
|
|
262
|
+
f"/v1/org/categories/{category_id}/tags",
|
|
263
|
+
options=make_request_options(
|
|
264
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
265
|
+
),
|
|
266
|
+
cast_to=CategoryTagsResponse,
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
async def topics(
|
|
270
|
+
self,
|
|
271
|
+
category_id: str,
|
|
272
|
+
*,
|
|
273
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
274
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
275
|
+
extra_headers: Headers | None = None,
|
|
276
|
+
extra_query: Query | None = None,
|
|
277
|
+
extra_body: Body | None = None,
|
|
278
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
279
|
+
) -> CategoryTopicsResponse:
|
|
280
|
+
"""
|
|
281
|
+
Get the organization categories.
|
|
282
|
+
|
|
283
|
+
Args:
|
|
284
|
+
extra_headers: Send extra headers
|
|
285
|
+
|
|
286
|
+
extra_query: Add additional query parameters to the request
|
|
287
|
+
|
|
288
|
+
extra_body: Add additional JSON properties to the request
|
|
289
|
+
|
|
290
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
291
|
+
"""
|
|
292
|
+
if not category_id:
|
|
293
|
+
raise ValueError(f"Expected a non-empty value for `category_id` but received {category_id!r}")
|
|
294
|
+
return await self._get(
|
|
295
|
+
f"/v1/org/categories/{category_id}/topics",
|
|
296
|
+
options=make_request_options(
|
|
297
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
298
|
+
),
|
|
299
|
+
cast_to=CategoryTopicsResponse,
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
class CategoriesResourceWithRawResponse:
|
|
304
|
+
def __init__(self, categories: CategoriesResource) -> None:
|
|
305
|
+
self._categories = categories
|
|
306
|
+
|
|
307
|
+
self.list = to_raw_response_wrapper(
|
|
308
|
+
categories.list,
|
|
309
|
+
)
|
|
310
|
+
self.prompts = to_raw_response_wrapper(
|
|
311
|
+
categories.prompts,
|
|
312
|
+
)
|
|
313
|
+
self.tags = to_raw_response_wrapper(
|
|
314
|
+
categories.tags,
|
|
315
|
+
)
|
|
316
|
+
self.topics = to_raw_response_wrapper(
|
|
317
|
+
categories.topics,
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
class AsyncCategoriesResourceWithRawResponse:
|
|
322
|
+
def __init__(self, categories: AsyncCategoriesResource) -> None:
|
|
323
|
+
self._categories = categories
|
|
324
|
+
|
|
325
|
+
self.list = async_to_raw_response_wrapper(
|
|
326
|
+
categories.list,
|
|
327
|
+
)
|
|
328
|
+
self.prompts = async_to_raw_response_wrapper(
|
|
329
|
+
categories.prompts,
|
|
330
|
+
)
|
|
331
|
+
self.tags = async_to_raw_response_wrapper(
|
|
332
|
+
categories.tags,
|
|
333
|
+
)
|
|
334
|
+
self.topics = async_to_raw_response_wrapper(
|
|
335
|
+
categories.topics,
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
class CategoriesResourceWithStreamingResponse:
|
|
340
|
+
def __init__(self, categories: CategoriesResource) -> None:
|
|
341
|
+
self._categories = categories
|
|
342
|
+
|
|
343
|
+
self.list = to_streamed_response_wrapper(
|
|
344
|
+
categories.list,
|
|
345
|
+
)
|
|
346
|
+
self.prompts = to_streamed_response_wrapper(
|
|
347
|
+
categories.prompts,
|
|
348
|
+
)
|
|
349
|
+
self.tags = to_streamed_response_wrapper(
|
|
350
|
+
categories.tags,
|
|
351
|
+
)
|
|
352
|
+
self.topics = to_streamed_response_wrapper(
|
|
353
|
+
categories.topics,
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
class AsyncCategoriesResourceWithStreamingResponse:
|
|
358
|
+
def __init__(self, categories: AsyncCategoriesResource) -> None:
|
|
359
|
+
self._categories = categories
|
|
360
|
+
|
|
361
|
+
self.list = async_to_streamed_response_wrapper(
|
|
362
|
+
categories.list,
|
|
363
|
+
)
|
|
364
|
+
self.prompts = async_to_streamed_response_wrapper(
|
|
365
|
+
categories.prompts,
|
|
366
|
+
)
|
|
367
|
+
self.tags = async_to_streamed_response_wrapper(
|
|
368
|
+
categories.tags,
|
|
369
|
+
)
|
|
370
|
+
self.topics = async_to_streamed_response_wrapper(
|
|
371
|
+
categories.topics,
|
|
372
|
+
)
|
|
@@ -0,0 +1,269 @@
|
|
|
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 Body, Query, Headers, NotGiven, not_given
|
|
8
|
+
from ..._compat import cached_property
|
|
9
|
+
from .categories import (
|
|
10
|
+
CategoriesResource,
|
|
11
|
+
AsyncCategoriesResource,
|
|
12
|
+
CategoriesResourceWithRawResponse,
|
|
13
|
+
AsyncCategoriesResourceWithRawResponse,
|
|
14
|
+
CategoriesResourceWithStreamingResponse,
|
|
15
|
+
AsyncCategoriesResourceWithStreamingResponse,
|
|
16
|
+
)
|
|
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.organization_models_response import OrganizationModelsResponse
|
|
26
|
+
from ...types.organization_domains_response import OrganizationDomainsResponse
|
|
27
|
+
from ...types.organization_regions_response import OrganizationRegionsResponse
|
|
28
|
+
|
|
29
|
+
__all__ = ["OrganizationsResource", "AsyncOrganizationsResource"]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class OrganizationsResource(SyncAPIResource):
|
|
33
|
+
@cached_property
|
|
34
|
+
def categories(self) -> CategoriesResource:
|
|
35
|
+
return CategoriesResource(self._client)
|
|
36
|
+
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_raw_response(self) -> OrganizationsResourceWithRawResponse:
|
|
39
|
+
"""
|
|
40
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
41
|
+
the raw response object instead of the parsed content.
|
|
42
|
+
|
|
43
|
+
For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#accessing-raw-response-data-eg-headers
|
|
44
|
+
"""
|
|
45
|
+
return OrganizationsResourceWithRawResponse(self)
|
|
46
|
+
|
|
47
|
+
@cached_property
|
|
48
|
+
def with_streaming_response(self) -> OrganizationsResourceWithStreamingResponse:
|
|
49
|
+
"""
|
|
50
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
51
|
+
|
|
52
|
+
For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#with_streaming_response
|
|
53
|
+
"""
|
|
54
|
+
return OrganizationsResourceWithStreamingResponse(self)
|
|
55
|
+
|
|
56
|
+
def domains(
|
|
57
|
+
self,
|
|
58
|
+
*,
|
|
59
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
60
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
61
|
+
extra_headers: Headers | None = None,
|
|
62
|
+
extra_query: Query | None = None,
|
|
63
|
+
extra_body: Body | None = None,
|
|
64
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
65
|
+
) -> OrganizationDomainsResponse:
|
|
66
|
+
"""Get the organization domains."""
|
|
67
|
+
return self._get(
|
|
68
|
+
"/v1/org/domains",
|
|
69
|
+
options=make_request_options(
|
|
70
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
71
|
+
),
|
|
72
|
+
cast_to=OrganizationDomainsResponse,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def models(
|
|
76
|
+
self,
|
|
77
|
+
*,
|
|
78
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
79
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
80
|
+
extra_headers: Headers | None = None,
|
|
81
|
+
extra_query: Query | None = None,
|
|
82
|
+
extra_body: Body | None = None,
|
|
83
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
84
|
+
) -> OrganizationModelsResponse:
|
|
85
|
+
"""Get the organization models."""
|
|
86
|
+
return self._get(
|
|
87
|
+
"/v1/org/models",
|
|
88
|
+
options=make_request_options(
|
|
89
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
90
|
+
),
|
|
91
|
+
cast_to=OrganizationModelsResponse,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
def regions(
|
|
95
|
+
self,
|
|
96
|
+
*,
|
|
97
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
98
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
99
|
+
extra_headers: Headers | None = None,
|
|
100
|
+
extra_query: Query | None = None,
|
|
101
|
+
extra_body: Body | None = None,
|
|
102
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
103
|
+
) -> OrganizationRegionsResponse:
|
|
104
|
+
"""Get the organization regions."""
|
|
105
|
+
return self._get(
|
|
106
|
+
"/v1/org/regions",
|
|
107
|
+
options=make_request_options(
|
|
108
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
109
|
+
),
|
|
110
|
+
cast_to=OrganizationRegionsResponse,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
class AsyncOrganizationsResource(AsyncAPIResource):
|
|
115
|
+
@cached_property
|
|
116
|
+
def categories(self) -> AsyncCategoriesResource:
|
|
117
|
+
return AsyncCategoriesResource(self._client)
|
|
118
|
+
|
|
119
|
+
@cached_property
|
|
120
|
+
def with_raw_response(self) -> AsyncOrganizationsResourceWithRawResponse:
|
|
121
|
+
"""
|
|
122
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
123
|
+
the raw response object instead of the parsed content.
|
|
124
|
+
|
|
125
|
+
For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#accessing-raw-response-data-eg-headers
|
|
126
|
+
"""
|
|
127
|
+
return AsyncOrganizationsResourceWithRawResponse(self)
|
|
128
|
+
|
|
129
|
+
@cached_property
|
|
130
|
+
def with_streaming_response(self) -> AsyncOrganizationsResourceWithStreamingResponse:
|
|
131
|
+
"""
|
|
132
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
133
|
+
|
|
134
|
+
For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#with_streaming_response
|
|
135
|
+
"""
|
|
136
|
+
return AsyncOrganizationsResourceWithStreamingResponse(self)
|
|
137
|
+
|
|
138
|
+
async def domains(
|
|
139
|
+
self,
|
|
140
|
+
*,
|
|
141
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
142
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
143
|
+
extra_headers: Headers | None = None,
|
|
144
|
+
extra_query: Query | None = None,
|
|
145
|
+
extra_body: Body | None = None,
|
|
146
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
147
|
+
) -> OrganizationDomainsResponse:
|
|
148
|
+
"""Get the organization domains."""
|
|
149
|
+
return await self._get(
|
|
150
|
+
"/v1/org/domains",
|
|
151
|
+
options=make_request_options(
|
|
152
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
153
|
+
),
|
|
154
|
+
cast_to=OrganizationDomainsResponse,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
async def models(
|
|
158
|
+
self,
|
|
159
|
+
*,
|
|
160
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
161
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
162
|
+
extra_headers: Headers | None = None,
|
|
163
|
+
extra_query: Query | None = None,
|
|
164
|
+
extra_body: Body | None = None,
|
|
165
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
166
|
+
) -> OrganizationModelsResponse:
|
|
167
|
+
"""Get the organization models."""
|
|
168
|
+
return await self._get(
|
|
169
|
+
"/v1/org/models",
|
|
170
|
+
options=make_request_options(
|
|
171
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
172
|
+
),
|
|
173
|
+
cast_to=OrganizationModelsResponse,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
async def regions(
|
|
177
|
+
self,
|
|
178
|
+
*,
|
|
179
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
180
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
181
|
+
extra_headers: Headers | None = None,
|
|
182
|
+
extra_query: Query | None = None,
|
|
183
|
+
extra_body: Body | None = None,
|
|
184
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
185
|
+
) -> OrganizationRegionsResponse:
|
|
186
|
+
"""Get the organization regions."""
|
|
187
|
+
return await self._get(
|
|
188
|
+
"/v1/org/regions",
|
|
189
|
+
options=make_request_options(
|
|
190
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
191
|
+
),
|
|
192
|
+
cast_to=OrganizationRegionsResponse,
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class OrganizationsResourceWithRawResponse:
|
|
197
|
+
def __init__(self, organizations: OrganizationsResource) -> None:
|
|
198
|
+
self._organizations = organizations
|
|
199
|
+
|
|
200
|
+
self.domains = to_raw_response_wrapper(
|
|
201
|
+
organizations.domains,
|
|
202
|
+
)
|
|
203
|
+
self.models = to_raw_response_wrapper(
|
|
204
|
+
organizations.models,
|
|
205
|
+
)
|
|
206
|
+
self.regions = to_raw_response_wrapper(
|
|
207
|
+
organizations.regions,
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
@cached_property
|
|
211
|
+
def categories(self) -> CategoriesResourceWithRawResponse:
|
|
212
|
+
return CategoriesResourceWithRawResponse(self._organizations.categories)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
class AsyncOrganizationsResourceWithRawResponse:
|
|
216
|
+
def __init__(self, organizations: AsyncOrganizationsResource) -> None:
|
|
217
|
+
self._organizations = organizations
|
|
218
|
+
|
|
219
|
+
self.domains = async_to_raw_response_wrapper(
|
|
220
|
+
organizations.domains,
|
|
221
|
+
)
|
|
222
|
+
self.models = async_to_raw_response_wrapper(
|
|
223
|
+
organizations.models,
|
|
224
|
+
)
|
|
225
|
+
self.regions = async_to_raw_response_wrapper(
|
|
226
|
+
organizations.regions,
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
@cached_property
|
|
230
|
+
def categories(self) -> AsyncCategoriesResourceWithRawResponse:
|
|
231
|
+
return AsyncCategoriesResourceWithRawResponse(self._organizations.categories)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
class OrganizationsResourceWithStreamingResponse:
|
|
235
|
+
def __init__(self, organizations: OrganizationsResource) -> None:
|
|
236
|
+
self._organizations = organizations
|
|
237
|
+
|
|
238
|
+
self.domains = to_streamed_response_wrapper(
|
|
239
|
+
organizations.domains,
|
|
240
|
+
)
|
|
241
|
+
self.models = to_streamed_response_wrapper(
|
|
242
|
+
organizations.models,
|
|
243
|
+
)
|
|
244
|
+
self.regions = to_streamed_response_wrapper(
|
|
245
|
+
organizations.regions,
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
@cached_property
|
|
249
|
+
def categories(self) -> CategoriesResourceWithStreamingResponse:
|
|
250
|
+
return CategoriesResourceWithStreamingResponse(self._organizations.categories)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
class AsyncOrganizationsResourceWithStreamingResponse:
|
|
254
|
+
def __init__(self, organizations: AsyncOrganizationsResource) -> None:
|
|
255
|
+
self._organizations = organizations
|
|
256
|
+
|
|
257
|
+
self.domains = async_to_streamed_response_wrapper(
|
|
258
|
+
organizations.domains,
|
|
259
|
+
)
|
|
260
|
+
self.models = async_to_streamed_response_wrapper(
|
|
261
|
+
organizations.models,
|
|
262
|
+
)
|
|
263
|
+
self.regions = async_to_streamed_response_wrapper(
|
|
264
|
+
organizations.regions,
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
@cached_property
|
|
268
|
+
def categories(self) -> AsyncCategoriesResourceWithStreamingResponse:
|
|
269
|
+
return AsyncCategoriesResourceWithStreamingResponse(self._organizations.categories)
|