anaplan-sdk 0.3.1b1__py3-none-any.whl → 0.4.0a2__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.
- anaplan_sdk/_async_clients/__init__.py +8 -1
- anaplan_sdk/_async_clients/_alm.py +1 -22
- anaplan_sdk/_async_clients/_audit.py +18 -3
- anaplan_sdk/_async_clients/_bulk.py +75 -28
- anaplan_sdk/_async_clients/_cloud_works.py +344 -0
- anaplan_sdk/_async_clients/_cw_flow.py +80 -0
- anaplan_sdk/_async_clients/_transactional.py +0 -26
- anaplan_sdk/_auth.py +170 -57
- anaplan_sdk/_base.py +116 -27
- anaplan_sdk/_clients/_alm.py +1 -22
- anaplan_sdk/_clients/_audit.py +16 -3
- anaplan_sdk/_clients/_bulk.py +72 -30
- anaplan_sdk/_clients/_cloud_works.py +342 -0
- anaplan_sdk/_clients/_cw_flow.py +78 -0
- anaplan_sdk/_clients/_transactional.py +0 -22
- anaplan_sdk/models/__init__.py +49 -0
- anaplan_sdk/models/_alm.py +55 -0
- anaplan_sdk/models/_base.py +17 -0
- anaplan_sdk/models/_bulk.py +176 -0
- anaplan_sdk/models/_transactional.py +94 -0
- anaplan_sdk/models/cloud_works.py +478 -0
- anaplan_sdk/models/flows.py +86 -0
- anaplan_sdk-0.4.0a2.dist-info/METADATA +87 -0
- anaplan_sdk-0.4.0a2.dist-info/RECORD +29 -0
- anaplan_sdk/models.py +0 -329
- anaplan_sdk-0.3.1b1.dist-info/METADATA +0 -109
- anaplan_sdk-0.3.1b1.dist-info/RECORD +0 -19
- {anaplan_sdk-0.3.1b1.dist-info → anaplan_sdk-0.4.0a2.dist-info}/WHEEL +0 -0
- {anaplan_sdk-0.3.1b1.dist-info → anaplan_sdk-0.4.0a2.dist-info}/licenses/LICENSE +0 -0
anaplan_sdk/models.py
DELETED
@@ -1,329 +0,0 @@
|
|
1
|
-
from typing import Literal, TypeAlias
|
2
|
-
|
3
|
-
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
4
|
-
from pydantic.alias_generators import to_camel
|
5
|
-
|
6
|
-
ExportTypes: TypeAlias = Literal[
|
7
|
-
"TABULAR_MULTI_COLUMN",
|
8
|
-
"TABULAR_SINGLE_COLUMN",
|
9
|
-
"GRID_CURRENT_PAGE",
|
10
|
-
"AUDIT_LOG",
|
11
|
-
"TABULAR_ALL_LINE_ITEMS",
|
12
|
-
"TABULAR_CURRENT_LINE_ITEM",
|
13
|
-
]
|
14
|
-
|
15
|
-
ImportTypes: TypeAlias = Literal[
|
16
|
-
"MODULE_DATA", "HIERARCHY_DATA", "LINE_ITEM_DEFINITION", "USERS", "VERSIONS"
|
17
|
-
]
|
18
|
-
|
19
|
-
|
20
|
-
class Workspace(BaseModel):
|
21
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
22
|
-
id: str = Field(description="The unique identifier of this workspace.")
|
23
|
-
name: str = Field(description="The name of this workspace that is also displayed to the users.")
|
24
|
-
active: bool = Field(description="Whether this workspace is active or not.")
|
25
|
-
size_allowance: int = Field(description="The maximum allowed size of this workspace in bytes.")
|
26
|
-
current_size: int = Field(description="The current size of this workspace in bytes.")
|
27
|
-
|
28
|
-
|
29
|
-
class Model(BaseModel):
|
30
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
31
|
-
id: str = Field(description="The unique identifier of this model.")
|
32
|
-
name: str
|
33
|
-
active_state: Literal["ARCHIVED", "UNLOCKED", "ACTIVE", "PRODUCTION"] = Field(
|
34
|
-
description="The current state of this model."
|
35
|
-
)
|
36
|
-
last_saved_serial_number: int = Field(
|
37
|
-
description="The serial number of the last save of this model."
|
38
|
-
)
|
39
|
-
last_modified_by_user_guid: str = Field(
|
40
|
-
description="The unique identifier of the user who last modified this model."
|
41
|
-
)
|
42
|
-
memory_usage: int = Field(0, description="The memory usage of this model in bytes.")
|
43
|
-
current_workspace_id: str = Field(
|
44
|
-
description="The unique identifier of the workspace that this model is currently in."
|
45
|
-
)
|
46
|
-
current_workspace_name: str = Field(
|
47
|
-
description="The name of the workspace that this model is currently in."
|
48
|
-
)
|
49
|
-
url: str = Field(validation_alias="modelUrl", description="The current URL of this model.")
|
50
|
-
category_values: list = Field(description="The category values of this model.")
|
51
|
-
iso_creation_date: str = Field(description="The creation date of this model in ISO format.")
|
52
|
-
last_modified: str = Field(description="The last modified date of this model.")
|
53
|
-
|
54
|
-
|
55
|
-
class File(BaseModel):
|
56
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
57
|
-
id: int = Field(description="The unique identifier of this file.")
|
58
|
-
name: str = Field(description="The name of this file.")
|
59
|
-
chunk_count: int = Field(description="The number of chunks this file is split into.")
|
60
|
-
delimiter: str | None = Field(None, description="The delimiter used in this file.")
|
61
|
-
encoding: str | None = Field(None, description="The encoding of this file.")
|
62
|
-
first_data_row: int = Field(description="The row number of the first data row in this file.")
|
63
|
-
format: str | None = Field(None, description="The format of this file.")
|
64
|
-
header_row: int = Field(description="The row number of the header row in this file.")
|
65
|
-
separator: str | None = Field(None, description="The separator used in this file.")
|
66
|
-
|
67
|
-
|
68
|
-
class List(BaseModel):
|
69
|
-
id: int = Field(description="The unique identifier of this list.")
|
70
|
-
name: str = Field(description="The name of this list.")
|
71
|
-
|
72
|
-
|
73
|
-
class ListMetadata(BaseModel):
|
74
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
75
|
-
id: int = Field(description="The unique identifier of this list.")
|
76
|
-
name: str = Field(description="The name of this list.")
|
77
|
-
has_selective_access: bool = Field(description="Whether this list has selective access or not.")
|
78
|
-
properties: list = Field([], description="The properties of this list.")
|
79
|
-
production_data: bool = Field(description="Whether this list is production data or not.")
|
80
|
-
managed_by: str = Field(description="The user who manages this list.")
|
81
|
-
numbered_list: bool = Field(description="Whether this list is a numbered list or not.")
|
82
|
-
use_top_level_as_page_default: bool = Field(
|
83
|
-
description="Whether the top level is used as the page default or not."
|
84
|
-
)
|
85
|
-
item_count: int = Field(description="The number of items in this list.")
|
86
|
-
next_item_index: int | None = Field(
|
87
|
-
None, description="The index of the next item in this list."
|
88
|
-
)
|
89
|
-
workflow_enabled: bool = Field(
|
90
|
-
description="Whether the workflow is enabled for this list or not."
|
91
|
-
)
|
92
|
-
permitted_items: int = Field(description="The number of permitted items in this list.")
|
93
|
-
used_in_applies_to: str | None = Field(None, description="The applies to value of this list.")
|
94
|
-
|
95
|
-
|
96
|
-
class Action(BaseModel):
|
97
|
-
model_config = ConfigDict(populate_by_name=True)
|
98
|
-
id: int = Field(description="The unique identifier of this action.")
|
99
|
-
name: str = Field(
|
100
|
-
description="The name of this Action. This is the same as the one displayed in the Web UI."
|
101
|
-
)
|
102
|
-
type: str | None = Field(
|
103
|
-
None, validation_alias="actionType", description="The type of this action."
|
104
|
-
)
|
105
|
-
|
106
|
-
|
107
|
-
class ListItem(BaseModel):
|
108
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
109
|
-
id: int = Field(description="The unique identifier of this list item.")
|
110
|
-
name: str = Field(description="The name of this list item.")
|
111
|
-
code: str | None = Field(None, description="The code of this list item.")
|
112
|
-
properties: dict = Field({}, description="The properties of this list item.")
|
113
|
-
subsets: dict = Field({}, description="The subsets of this list item.")
|
114
|
-
parent: str | None = Field(None, description="The parent of this list item.")
|
115
|
-
parent_id: str | None = Field(
|
116
|
-
None, description="The unique identifier of the parent of this list item."
|
117
|
-
)
|
118
|
-
|
119
|
-
|
120
|
-
class Process(BaseModel):
|
121
|
-
id: int = Field(description="The unique identifier of this process.")
|
122
|
-
name: str = Field(description="The name of this process.")
|
123
|
-
|
124
|
-
|
125
|
-
class Import(BaseModel):
|
126
|
-
id: int = Field(description="The unique identifier of this import.")
|
127
|
-
name: str = Field(description="The name of this import.")
|
128
|
-
type: ImportTypes = Field(validation_alias="importType", description="The type of this import.")
|
129
|
-
file_id: int | None = Field(
|
130
|
-
None,
|
131
|
-
validation_alias="importDataSourceId",
|
132
|
-
description=(
|
133
|
-
"The unique identifier of the data source of this import. If it is absent, it means "
|
134
|
-
"that the import is not a file import."
|
135
|
-
),
|
136
|
-
)
|
137
|
-
|
138
|
-
# noinspection PyNestedDecorators
|
139
|
-
@field_validator("file_id", mode="before")
|
140
|
-
@classmethod
|
141
|
-
def _empty_source_is_none(cls, inp: str):
|
142
|
-
return inp if inp else None
|
143
|
-
|
144
|
-
|
145
|
-
class Export(BaseModel):
|
146
|
-
model_config = ConfigDict(populate_by_name=True)
|
147
|
-
id: int = Field(description="The unique identifier of this export.")
|
148
|
-
name: str = Field(description="The name of this export.")
|
149
|
-
type: ExportTypes = Field(validation_alias="exportType", description="The type of this export.")
|
150
|
-
format: str = Field(validation_alias="exportFormat", description="The format of this export.")
|
151
|
-
encoding: str | None = Field(None, description="The encoding of this export.")
|
152
|
-
layout: ExportTypes = Field(
|
153
|
-
description="The layout of this export, representing the Anaplan Export Structure."
|
154
|
-
)
|
155
|
-
|
156
|
-
|
157
|
-
class Module(BaseModel):
|
158
|
-
id: int = Field(description="The unique identifier of this module.")
|
159
|
-
name: str = Field(description="The name of this module.")
|
160
|
-
|
161
|
-
|
162
|
-
class ModelStatus(BaseModel):
|
163
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
164
|
-
peak_memory_usage_estimate: int | None = Field(
|
165
|
-
description="The peak memory usage estimate of this model."
|
166
|
-
)
|
167
|
-
peak_memory_usage_time: int | None = Field(
|
168
|
-
description="The peak memory usage time of this model."
|
169
|
-
)
|
170
|
-
progress: float = Field(description="The progress of this model.")
|
171
|
-
current_step: str = Field(description="The current step of this model.")
|
172
|
-
tooltip: str | None = Field(description="The tooltip of this model.")
|
173
|
-
task_id: str | None = Field(description="The unique identifier of the task of this model.")
|
174
|
-
creation_time: int = Field(description="The creation time of this model.")
|
175
|
-
export_task_type: str | None = Field(description="The export task type of this model.")
|
176
|
-
|
177
|
-
|
178
|
-
class LineItem(BaseModel):
|
179
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
180
|
-
id: int = Field(description="The unique identifier of this line item.")
|
181
|
-
name: str = Field(description="The name of this line item.")
|
182
|
-
module_id: int = Field(
|
183
|
-
description="The unique identifier of the module this line item belongs to."
|
184
|
-
)
|
185
|
-
module_name: str = Field(description="The name of the module this line item belongs to.")
|
186
|
-
format: str = Field(description="The format of this line item.")
|
187
|
-
format_metadata: dict = Field(description="The format metadata of this line item.")
|
188
|
-
summary: str = Field(description="The summary of this line item.")
|
189
|
-
applies_to: list[dict] = Field([], description="The applies to value of this line item.")
|
190
|
-
time_scale: str = Field(description="The time scale of this line item.")
|
191
|
-
time_range: str = Field(description="The time range of this line item.")
|
192
|
-
version: dict = Field(description="The version of this line item.")
|
193
|
-
style: str = Field(description="The style of this line item.")
|
194
|
-
cell_count: int | None = Field(None, description="The cell count of this line item.")
|
195
|
-
notes: str = Field(description="The notes of this line item.")
|
196
|
-
is_summary: bool = Field(description="Whether this line item is a summary or not.")
|
197
|
-
formula: str | None = Field(None, description="The formula of this line item.")
|
198
|
-
formula_scope: str = Field(description="The formula scope of this line item.")
|
199
|
-
use_switchover: bool = Field(description="Whether the switchover is used or not.")
|
200
|
-
breakback: bool = Field(description="Whether the breakback is enabled or not.")
|
201
|
-
brought_forward: bool = Field(description="Whether the brought forward is enabled or not.")
|
202
|
-
start_of_section: bool = Field(
|
203
|
-
description="Whether this line item is the start of a section or not."
|
204
|
-
)
|
205
|
-
|
206
|
-
|
207
|
-
class Failure(BaseModel):
|
208
|
-
model_config = ConfigDict(populate_by_name=True)
|
209
|
-
index: int = Field(
|
210
|
-
validation_alias="requestIndex", description="The index of the item that failed."
|
211
|
-
)
|
212
|
-
reason: str = Field(validation_alias="failureType", description="The reason for the failure.")
|
213
|
-
details: str = Field(
|
214
|
-
validation_alias="failureMessageDetails", description="The details of the failure."
|
215
|
-
)
|
216
|
-
|
217
|
-
|
218
|
-
class InsertionResult(BaseModel):
|
219
|
-
added: int = Field(description="The number of items successfully added.")
|
220
|
-
ignored: int = Field(description="The number of items ignored, or items that failed.")
|
221
|
-
total: int = Field(description="The total number of items.")
|
222
|
-
failures: list[Failure] = Field([], description="The list of failures.")
|
223
|
-
|
224
|
-
|
225
|
-
class Revision(BaseModel):
|
226
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
227
|
-
id: str = Field(description="The unique identifier of this revision.")
|
228
|
-
name: str = Field(description="The name of this revision.")
|
229
|
-
description: str | None = Field(
|
230
|
-
None, description="The description of this revision. Not always present."
|
231
|
-
)
|
232
|
-
created_on: str = Field(description="The creation date of this revision in ISO format.")
|
233
|
-
created_by: str = Field(
|
234
|
-
description="The unique identifier of the user who created this revision."
|
235
|
-
)
|
236
|
-
creation_method: str = Field(description="The creation method of this revision.")
|
237
|
-
applied_on: str = Field(description="The application date of this revision in ISO format.")
|
238
|
-
applied_by: str = Field(
|
239
|
-
description="The unique identifier of the user who applied this revision."
|
240
|
-
)
|
241
|
-
|
242
|
-
|
243
|
-
class ModelRevision(BaseModel):
|
244
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
245
|
-
id: str = Field(
|
246
|
-
validation_alias="modelId",
|
247
|
-
description="The unique identifier of the model this revision belongs to.",
|
248
|
-
)
|
249
|
-
name: str = Field(
|
250
|
-
validation_alias="modelName", description="The name of the model this revision belongs to."
|
251
|
-
)
|
252
|
-
workspace_id: str = Field(
|
253
|
-
description="The unique identifier of the workspace this revision belongs to."
|
254
|
-
)
|
255
|
-
applied_by: str = Field(
|
256
|
-
description="The unique identifier of the user who applied this revision."
|
257
|
-
)
|
258
|
-
applied_on: str = Field(description="The application date of this revision in ISO format.")
|
259
|
-
applied_method: str = Field(description="The application method of this revision.")
|
260
|
-
deleted: bool | None = Field(
|
261
|
-
None,
|
262
|
-
validation_alias="modelDeleted",
|
263
|
-
description="Whether the model has been deleted or not.",
|
264
|
-
)
|
265
|
-
|
266
|
-
|
267
|
-
class SyncTask(BaseModel):
|
268
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
269
|
-
id: str = Field(validation_alias="taskId", description="The unique identifier of this task.")
|
270
|
-
task_state: str = Field(description="The state of this task.")
|
271
|
-
creation_time: int = Field(description="The creation time of this task.")
|
272
|
-
|
273
|
-
|
274
|
-
class User(BaseModel):
|
275
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
276
|
-
id: str = Field(description="The unique identifier of this user.")
|
277
|
-
active: bool = Field(description="Whether this user is active or not.")
|
278
|
-
email: str = Field(description="The email address of this user.")
|
279
|
-
email_opt_in: bool = Field(
|
280
|
-
description="Whether this user has opted in to receive emails or not."
|
281
|
-
)
|
282
|
-
first_name: str = Field(description="The first name of this user.")
|
283
|
-
last_name: str = Field(description="The last name of this user.")
|
284
|
-
last_login_date: str | None = Field(
|
285
|
-
None, description="The last login date of this user in ISO format."
|
286
|
-
)
|
287
|
-
|
288
|
-
|
289
|
-
class TaskSummary(BaseModel):
|
290
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
291
|
-
id: str = Field(validation_alias="taskId", description="The unique identifier of this task.")
|
292
|
-
task_state: Literal["NOT_STARTED", "IN_PROGRESS", "COMPLETE"] = Field(
|
293
|
-
description="The state of this task."
|
294
|
-
)
|
295
|
-
creation_time: int = Field(description="Unix timestamp of when this task was created.")
|
296
|
-
|
297
|
-
|
298
|
-
class TaskResultDetail(BaseModel):
|
299
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
300
|
-
local_message_text: str = Field(description="Error message text.")
|
301
|
-
occurrences: int = Field(0, description="The number of occurrences of this error.")
|
302
|
-
type: str = Field(description="The type of this error.")
|
303
|
-
values: list[str] = Field([], description="Further error information if available.")
|
304
|
-
|
305
|
-
|
306
|
-
class TaskResult(BaseModel):
|
307
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
308
|
-
details: list[TaskResultDetail] = Field(
|
309
|
-
[], description="The details of this task result if available."
|
310
|
-
)
|
311
|
-
successful: bool = Field(description="Whether this task completed successfully or not.")
|
312
|
-
failure_dump_available: bool = Field(
|
313
|
-
description="Whether this task completed successfully or not."
|
314
|
-
)
|
315
|
-
nested_results: list["TaskResult"] = Field(
|
316
|
-
[], description="The nested results of this task, if available."
|
317
|
-
)
|
318
|
-
|
319
|
-
|
320
|
-
class TaskStatus(BaseModel):
|
321
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
322
|
-
id: str = Field(validation_alias="taskId", description="The unique identifier of this task.")
|
323
|
-
task_state: Literal["NOT_STARTED", "IN_PROGRESS", "COMPLETE"] = Field(
|
324
|
-
description="The state of this task."
|
325
|
-
)
|
326
|
-
creation_time: int = Field(description="Unix timestamp of when this task was created.")
|
327
|
-
progress: float = Field(description="The progress of this task as a float between 0 and 1.")
|
328
|
-
current_step: str | None = Field(None, description="The current step of this task.")
|
329
|
-
result: TaskResult | None = Field(None)
|
@@ -1,109 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: anaplan-sdk
|
3
|
-
Version: 0.3.1b1
|
4
|
-
Summary: Provides pythonic access to the Anaplan API
|
5
|
-
Project-URL: Homepage, https://vinzenzklass.github.io/anaplan-sdk/
|
6
|
-
Project-URL: Repository, https://github.com/VinzenzKlass/anaplan-sdk
|
7
|
-
Project-URL: Documentation, https://vinzenzklass.github.io/anaplan-sdk/
|
8
|
-
Author-email: Vinzenz Klass <vinzenz.klass@valantic.com>
|
9
|
-
License-Expression: Apache-2.0
|
10
|
-
License-File: LICENSE
|
11
|
-
Keywords: anaplan,anaplan alm api,anaplan api,anaplan audit api,anaplan bulk api,anaplan integration
|
12
|
-
Requires-Python: >=3.10.4
|
13
|
-
Requires-Dist: cryptography<45.0.0,>=42.0.7
|
14
|
-
Requires-Dist: httpx<1.0.0,>=0.27.0
|
15
|
-
Requires-Dist: pydantic<3.0.0,>=2.7.2
|
16
|
-
Description-Content-Type: text/markdown
|
17
|
-
|
18
|
-
<p align="center" style="margin: 0 0 10px">
|
19
|
-
<img width="200" height="200" src="https://vinzenzklass.github.io/anaplan-sdk/img/anaplan-sdk.webp" alt='Python' style="border-radius: 15px">
|
20
|
-
</p>
|
21
|
-
|
22
|
-
<h1 align="center" style="font-size: 3rem; font-weight: 400; margin: -15px 0">
|
23
|
-
Anaplan SDK
|
24
|
-
</h1>
|
25
|
-
|
26
|
-
<p align="center" style="margin-top: 15px">
|
27
|
-
<a href="https://pepy.tech/project/anaplan-sdk">
|
28
|
-
<img align="center" src="https://static.pepy.tech/badge/anaplan-sdk/month" alt="Downloads Badge"/>
|
29
|
-
</a>
|
30
|
-
</p>
|
31
|
-
|
32
|
-
---
|
33
|
-
|
34
|
-
Anaplan SDK is an independent, unofficial project providing pythonic access to Anaplan. Anaplan SDK provides high-level
|
35
|
-
abstractions over the various Anaplan APIs, so you can focus on you requirements rather than spend time on
|
36
|
-
implementation details like authentication, error handling, chunking, compression and data formatting.
|
37
|
-
|
38
|
-
This Projects supports
|
39
|
-
the [Bulk APIs](https://help.anaplan.com/use-the-bulk-apis-93218e5e-00e5-406e-8361-09ab861889a7),
|
40
|
-
the [Transactional APIs](https://help.anaplan.com/use-the-transactional-apis-cc1c1e91-39fc-4272-a4b5-16bc91e9c313) and
|
41
|
-
the [ALM APIs](https://help.anaplan.com/application-lifecycle-management-api-2565cfa6-e0c2-4e24-884e-d0df957184d6),
|
42
|
-
the [Audit APIs](https://auditservice.docs.apiary.io/#),
|
43
|
-
providing both synchronous and asynchronous Clients.
|
44
|
-
|
45
|
-
Visit [Anaplan SDK](https://vinzenzklass.github.io/anaplan-sdk/) for documentation.
|
46
|
-
|
47
|
-
---
|
48
|
-
|
49
|
-
### Install Anaplan SDK using pip
|
50
|
-
|
51
|
-
```shell
|
52
|
-
pip install anaplan-sdk
|
53
|
-
```
|
54
|
-
|
55
|
-
### Instantiate a client
|
56
|
-
|
57
|
-
```python
|
58
|
-
import anaplan_sdk
|
59
|
-
|
60
|
-
anaplan = anaplan_sdk.Client(
|
61
|
-
workspace_id="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
62
|
-
model_id="11111111111111111111111111111111",
|
63
|
-
user_email="admin@company.com",
|
64
|
-
password="my_super_secret_password",
|
65
|
-
)
|
66
|
-
```
|
67
|
-
|
68
|
-
### Find workspaces and models
|
69
|
-
|
70
|
-
If you don't know the workspace and model Ids, instantiate client with authentication information only and
|
71
|
-
call `.list_workspaces()` and list `.list_models()`
|
72
|
-
|
73
|
-
```python
|
74
|
-
anaplan = anaplan_sdk.Client(
|
75
|
-
user_email="admin@company.com",
|
76
|
-
password="my_super_secret_password",
|
77
|
-
)
|
78
|
-
|
79
|
-
for workspace in anaplan.list_workspaces():
|
80
|
-
print(f"{workspace.name}: {workspace.id}")
|
81
|
-
|
82
|
-
for model in anaplan.list_models():
|
83
|
-
print(f"{model.name}: {model.id}")
|
84
|
-
```
|
85
|
-
|
86
|
-
### Async Support
|
87
|
-
|
88
|
-
This SDK also provides an `AsyncClient` with full async support
|
89
|
-
|
90
|
-
```python
|
91
|
-
import asyncio
|
92
|
-
|
93
|
-
anaplan = anaplan_sdk.AsyncClient(
|
94
|
-
workspace_id="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
95
|
-
model_id="11111111111111111111111111111111",
|
96
|
-
user_email="admin@company.com",
|
97
|
-
password="my_super_secret_password",
|
98
|
-
)
|
99
|
-
workspaces, models = await asyncio.gather(
|
100
|
-
anaplan.list_workspaces(), anaplan.list_models()
|
101
|
-
)
|
102
|
-
for workspace in workspaces:
|
103
|
-
print(f"{workspace.name}: {workspace.id}")
|
104
|
-
for model in models:
|
105
|
-
print(f"{model.name}: {model.id}")
|
106
|
-
```
|
107
|
-
|
108
|
-
For more information, API reference and detailed guides,
|
109
|
-
visit [Anaplan SDK](https://vinzenzklass.github.io/anaplan-sdk/).
|
@@ -1,19 +0,0 @@
|
|
1
|
-
anaplan_sdk/__init__.py,sha256=5fr-SZSsH6f3vkRUTDoK6xdAN31cCpe9Mwz2VNu47Uw,134
|
2
|
-
anaplan_sdk/_auth.py,sha256=0d495G_iU8vfpk29BJow7Jw2staf18nXqpJlSfaL9h8,5123
|
3
|
-
anaplan_sdk/_base.py,sha256=sRsM1z2QadTZ3HhX5NDH6NNRgGCJTy32sJB3cQzDT7E,8465
|
4
|
-
anaplan_sdk/exceptions.py,sha256=ALkA9fBF0NQ7dufFxV6AivjmHyuJk9DOQ9jtJV2n7f0,1809
|
5
|
-
anaplan_sdk/models.py,sha256=CpfFVJcW4AVwbAoI6GuPClbywjs2bWXOyH7Vrlnlo4o,16255
|
6
|
-
anaplan_sdk/_async_clients/__init__.py,sha256=wT6qfi4f_4vLFWTJQTsBw8r3DrHtoTIVqi88p5_j-Cg,259
|
7
|
-
anaplan_sdk/_async_clients/_alm.py,sha256=HtpwKNCc5eb6DUgS8nqNocxzaoaHOAMQPo0SaTMaD-A,4021
|
8
|
-
anaplan_sdk/_async_clients/_audit.py,sha256=t8tsQQ6v5kJXERAeAWEI1P9-vO5GsJCyWRTwh7EK1uw,1467
|
9
|
-
anaplan_sdk/_async_clients/_bulk.py,sha256=O2EiDRdGliYMovGESUvjy2HM0SwsQh9UTmayKmtnASc,22419
|
10
|
-
anaplan_sdk/_async_clients/_transactional.py,sha256=eKLT2s5cfnLmK7eqzhfAn8kwoYxEBYgSqwhDgZFA03k,7496
|
11
|
-
anaplan_sdk/_clients/__init__.py,sha256=FsbwvZC1FHrxuRXwbPxUzbhz_lO1DpXIxEOjx6-3QuA,219
|
12
|
-
anaplan_sdk/_clients/_alm.py,sha256=wzhibRuNzsK3PZM2EOI3OnSGHfv8CG2fuY5zLbnSqog,3912
|
13
|
-
anaplan_sdk/_clients/_audit.py,sha256=ae6szT0_OhaNWZUA9b3s2xnkYhSOKbrtnn0SKxmDeqI,1485
|
14
|
-
anaplan_sdk/_clients/_bulk.py,sha256=NUW26y0-9PO_4yatabZ3n47ld66nHbBVP7Fx3GbG8l8,22471
|
15
|
-
anaplan_sdk/_clients/_transactional.py,sha256=_ZrR40sNREZbaSkIzxpM9iMc85Wq9LDnytR8IlU9lqY,7331
|
16
|
-
anaplan_sdk-0.3.1b1.dist-info/METADATA,sha256=6nZiUHD4AIAQxzF3SzgmZ-JfXaYrGsl7xyqdFjxft0k,3619
|
17
|
-
anaplan_sdk-0.3.1b1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
18
|
-
anaplan_sdk-0.3.1b1.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
19
|
-
anaplan_sdk-0.3.1b1.dist-info/RECORD,,
|
File without changes
|
File without changes
|