smartsheet-python-sdk 3.1.0__py2.py3-none-any.whl → 3.3.0__py2.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.
@@ -0,0 +1,163 @@
1
+ # pylint: disable=C0111,R0902,R0913
2
+ # Smartsheet Python SDK.
3
+ #
4
+ # Copyright 2018 Smartsheet.com, Inc.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License"): you may
7
+ # not use this file except in compliance with the License. You may obtain
8
+ # a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
+ # License for the specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ import logging
19
+ from . import fresh_operation
20
+ from .models.enums import ShareScope
21
+
22
+
23
+ class Sharing:
24
+ """Class for handling Sharing operations."""
25
+
26
+ def __init__(self, smartsheet_obj):
27
+ """Init Sharing with base Smartsheet object."""
28
+ self._base = smartsheet_obj
29
+ self._log = logging.getLogger(__name__)
30
+
31
+ def list_asset_shares(self, asset_type, asset_id, max_items=None, last_key=None,
32
+ sharing_include: ShareScope = None):
33
+ """Get the list of all Users and Groups to whom the specified asset is
34
+ shared, and their access level.
35
+
36
+ Args:
37
+ asset_type (AssetType): Type of asset (sheet, report, sight, workspace, etc.)
38
+ asset_id (int): Asset ID
39
+ max_items (int): The maximum number of items to
40
+ return in the response.
41
+ last_key (str): The token from a previous request that will allow this one
42
+ to pick up where the previous one left off.
43
+ sharing_include (ShareScope): Scope of share to include in response
44
+
45
+ Returns:
46
+ IndexResult
47
+ """
48
+ _op = fresh_operation('list_asset_shares')
49
+ _op['method'] = 'GET'
50
+ _op['path'] = '/shares'
51
+ _op['query_params']['assetType'] = asset_type
52
+ _op['query_params']['assetId'] = asset_id
53
+ _op['query_params']['maxItems'] = max_items
54
+ _op['query_params']['lastKey'] = last_key
55
+ _op['query_params']['sharingInclude'] = sharing_include.name if sharing_include else None
56
+
57
+ expected = ['IndexResult', 'Share']
58
+
59
+ prepped_request = self._base.prepare_request(_op)
60
+ response = self._base.request(prepped_request, expected, _op)
61
+
62
+ return response
63
+
64
+ def get_asset_share(self, asset_type, asset_id, share_id):
65
+ """Get a specific share for the specified asset.
66
+
67
+ Args:
68
+ asset_type (AssetType): Type of asset (sheet, report, sight, workspace, etc.)
69
+ asset_id (int): Asset ID
70
+ share_id (str): Share ID
71
+
72
+ Returns:
73
+ Share
74
+ """
75
+ _op = fresh_operation('get_asset_share')
76
+ _op['method'] = 'GET'
77
+ _op['path'] = f'/shares/{share_id}'
78
+ _op['query_params']['assetType'] = asset_type
79
+ _op['query_params']['assetId'] = asset_id
80
+
81
+ expected = 'Share'
82
+ prepped_request = self._base.prepare_request(_op)
83
+ response = self._base.request(prepped_request, expected, _op)
84
+
85
+ return response
86
+
87
+ def share_asset(self, share_obj, asset_type, asset_id, send_email=None):
88
+ """Share an asset with the specified Users and Groups.
89
+
90
+ Args:
91
+ share_obj (Share or list[Share]): Share object or list of Share objects.
92
+ asset_type (AssetType): Type of asset (sheet, report, sight, workspace, etc.)
93
+ asset_id (int): Asset ID
94
+ send_email (bool): Either true or false to
95
+ indicate whether or not to notify the user by email. Default
96
+ is false.
97
+
98
+ Returns:
99
+ Result
100
+ """
101
+ _op = fresh_operation('share_asset')
102
+ _op['method'] = 'POST'
103
+ _op['path'] = '/shares'
104
+ _op['query_params']['assetType'] = asset_type
105
+ _op['query_params']['assetId'] = asset_id
106
+ _op['query_params']['sendEmail'] = send_email
107
+ _op['json'] = share_obj
108
+
109
+ expected = ['Result', 'Share']
110
+
111
+ prepped_request = self._base.prepare_request(_op)
112
+ response = self._base.request(prepped_request, expected, _op)
113
+
114
+ return response
115
+
116
+ def update_asset_share(self, share_obj, asset_type, asset_id, share_id):
117
+ """Update the access level of a User or Group for the specified asset.
118
+
119
+ Args:
120
+ share_obj (Share): Share object.
121
+ asset_type (AssetType): Type of asset (sheet, report, sight, workspace, etc.)
122
+ asset_id (int): Asset ID
123
+ share_id (str): Share ID
124
+
125
+ Returns:
126
+ Result
127
+ """
128
+ _op = fresh_operation('update_share')
129
+ _op['method'] = 'PATCH'
130
+ _op['path'] = f'/shares/{share_id}'
131
+ _op['query_params']['assetType'] = asset_type
132
+ _op['query_params']['assetId'] = asset_id
133
+ _op['json'] = share_obj
134
+
135
+ expected = ['Result', 'Share']
136
+
137
+ prepped_request = self._base.prepare_request(_op)
138
+ response = self._base.request(prepped_request, expected, _op)
139
+
140
+ return response
141
+
142
+ def delete_asset_share(self, asset_type, asset_id, share_id):
143
+ """Delete the specified Share.
144
+
145
+ Args:
146
+ asset_type (AssetType): Type of asset (sheet, report, sight, workspace, etc.)
147
+ asset_id (int): Asset ID
148
+ share_id (str): Share ID
149
+
150
+ Returns:
151
+ Result
152
+ """
153
+ _op = fresh_operation('delete_share')
154
+ _op['method'] = 'DELETE'
155
+ _op['path'] = f'/shares/{share_id}'
156
+ _op['query_params']['assetType'] = asset_type
157
+ _op['query_params']['assetId'] = asset_id
158
+
159
+ expected = ['Result', None]
160
+ prepped_request = self._base.prepare_request(_op)
161
+ response = self._base.request(prepped_request, expected, _op)
162
+
163
+ return response
@@ -121,3 +121,4 @@ from .webhook_subscope import WebhookSubscope
121
121
  from .widget import Widget
122
122
  from .widget_content import WidgetContent
123
123
  from .workspace import Workspace
124
+ from .user_plan import UserPlan
@@ -19,6 +19,7 @@ from __future__ import absolute_import
19
19
 
20
20
  # import enums into enum package
21
21
  from .access_level import AccessLevel
22
+ from .asset_type import AssetType
22
23
  from .attachment_parent_type import AttachmentParentType
23
24
  from .attachment_sub_type import AttachmentSubType
24
25
  from .attachment_type import AttachmentType
@@ -52,3 +53,4 @@ from .system_column_type import SystemColumnType
52
53
  from .update_request_status import UpdateRequestStatus
53
54
  from .user_status import UserStatus
54
55
  from .widget_type import WidgetType
56
+ from .seat_type import SeatType, DowngradeSeatType, UpgradeSeatType
@@ -0,0 +1,10 @@
1
+ from enum import Enum
2
+
3
+ class AssetType(str, Enum):
4
+ """Defines the asset types supported by the Sharing API."""
5
+ SHEET = 'sheet'
6
+ REPORT = 'report'
7
+ SIGHT = 'sight'
8
+ WORKSPACE = 'workspace'
9
+ COLLECTION = 'collection'
10
+ FILE = 'file'
@@ -0,0 +1,17 @@
1
+ from enum import Enum
2
+
3
+ class SeatType(str, Enum):
4
+ VIEWER = 'VIEWER'
5
+ GUEST = 'GUEST'
6
+ MEMBER = 'MEMBER'
7
+ PROVISIONAL_MEMBER = 'PROVISIONAL_MEMBER'
8
+
9
+
10
+ class DowngradeSeatType(str, Enum):
11
+ VIEWER = 'VIEWER'
12
+ GUEST = 'GUEST'
13
+
14
+
15
+ class UpgradeSeatType(str, Enum):
16
+ GUEST = 'GUEST'
17
+ MEMBER = 'MEMBER'
@@ -18,7 +18,7 @@
18
18
  from __future__ import absolute_import
19
19
 
20
20
  from typing import TypeVar, Generic, List
21
- from ..types import String, json
21
+ from ..types import String, json, TypedList, importlib
22
22
  from ..util import deserialize, serialize
23
23
 
24
24
  T = TypeVar('T')
@@ -27,13 +27,17 @@ T = TypeVar('T')
27
27
  class TokenPaginatedResult(Generic[T]):
28
28
  """Smartsheet TokenPaginatedResult data model with generic type support."""
29
29
 
30
- def __init__(self, props=None, base_obj=None):
30
+ def __init__(self, props=None, dynamic_data_type=None, base_obj=None):
31
31
  """Initialize the TokenPaginatedResult model."""
32
32
  self._base = None
33
33
  if base_obj is not None:
34
34
  self._base = base_obj
35
35
 
36
- self._data = []
36
+ self._dynamic_data_type = None
37
+ if dynamic_data_type is not None:
38
+ self._dynamic_data_type = dynamic_data_type
39
+
40
+ self._data = TypedList(object)
37
41
  self._last_key = String()
38
42
 
39
43
  if props:
@@ -48,7 +52,14 @@ class TokenPaginatedResult(Generic[T]):
48
52
 
49
53
  @data.setter
50
54
  def data(self, value):
51
- self._data = value
55
+ class_ = getattr(
56
+ importlib.import_module("smartsheet.models"), self._dynamic_data_type
57
+ )
58
+ if isinstance(value, list):
59
+ self._data = [class_(x, self._base) for x in value]
60
+ else:
61
+ self._data = class_(value, self._base)
62
+
52
63
 
53
64
  @property
54
65
  def last_key(self):
@@ -19,6 +19,7 @@ from __future__ import absolute_import
19
19
 
20
20
  from ..types import (Boolean, EnumeratedValue, Number, String, Timestamp,
21
21
  TypedList, TypedObject, json)
22
+ from ..models.enums import SeatType
22
23
  from ..util import deserialize, serialize
23
24
  from .alternate_email import AlternateEmail
24
25
  from .enums import UserStatus
@@ -44,6 +45,7 @@ class UserModel:
44
45
  self._first_name = String()
45
46
  self._group_admin = Boolean()
46
47
  self._id_ = Number()
48
+ self._is_internal = Boolean()
47
49
  self._last_login = Timestamp()
48
50
  self._last_name = String()
49
51
  self._licensed_sheet_creator = Boolean()
@@ -51,6 +53,8 @@ class UserModel:
51
53
  self._profile_image = TypedObject(ProfileImage)
52
54
  self._resource_viewer = Boolean()
53
55
  self._role = String()
56
+ self._seat_type = EnumeratedValue(SeatType)
57
+ self._seat_type_last_changed_at = Timestamp()
54
58
  self._sheet_count = Number()
55
59
  self._status = EnumeratedValue(UserStatus)
56
60
  self._title = String()
@@ -145,6 +149,14 @@ class UserModel:
145
149
  def id_(self, value):
146
150
  self._id_.value = value
147
151
 
152
+ @property
153
+ def is_internal(self):
154
+ return self._is_internal.value
155
+
156
+ @is_internal.setter
157
+ def is_internal(self, value):
158
+ self._is_internal.value = value
159
+
148
160
  @property
149
161
  def last_login(self):
150
162
  return self._last_login.value
@@ -201,6 +213,22 @@ class UserModel:
201
213
  def role(self, value):
202
214
  self._role.value = value
203
215
 
216
+ @property
217
+ def seat_type(self):
218
+ return self._seat_type
219
+
220
+ @seat_type.setter
221
+ def seat_type(self, value):
222
+ self._seat_type.set(value)
223
+
224
+ @property
225
+ def seat_type_last_changed_at(self):
226
+ return self._seat_type_last_changed_at.value
227
+
228
+ @seat_type_last_changed_at.setter
229
+ def seat_type_last_changed_at(self, value):
230
+ self._seat_type_last_changed_at.value = value
231
+
204
232
  @property
205
233
  def sheet_count(self):
206
234
  return self._sheet_count.value
@@ -0,0 +1,68 @@
1
+ from __future__ import absolute_import
2
+
3
+ from ..types import (Boolean, EnumeratedValue, Number, String, Timestamp,
4
+ TypedList, TypedObject, json)
5
+ from ..models.enums import SeatType
6
+ from ..util import deserialize, serialize
7
+
8
+
9
+ class UserPlan:
10
+
11
+ """Smartsheet Plan for a User data model."""
12
+
13
+ def __init__(self, props=None, base_obj=None):
14
+ """Initialize the UserPlan model."""
15
+ self._base = None
16
+ if base_obj is not None:
17
+ self._base = base_obj
18
+
19
+ self._plan_id = Number()
20
+ self._seat_type = EnumeratedValue(SeatType)
21
+ self._seat_type_last_changed_at = Timestamp()
22
+ self._is_internal = Boolean()
23
+
24
+ if props:
25
+ deserialize(self, props)
26
+
27
+ self.__initialized = True
28
+
29
+ @property
30
+ def plan_id(self):
31
+ return self._plan_id.value
32
+
33
+ @plan_id.setter
34
+ def plan_id(self, value):
35
+ self._plan_id.value = value
36
+
37
+ @property
38
+ def seat_type(self):
39
+ return self._seat_type
40
+
41
+ @seat_type.setter
42
+ def seat_type(self, value):
43
+ self._seat_type.set(value)
44
+
45
+ @property
46
+ def seat_type_last_changed_at(self):
47
+ return self._seat_type_last_changed_at.value
48
+
49
+ @seat_type_last_changed_at.setter
50
+ def seat_type_last_changed_at(self, value):
51
+ self._seat_type_last_changed_at.value = value
52
+
53
+ @property
54
+ def is_internal(self):
55
+ return self._is_internal.value
56
+
57
+ @is_internal.setter
58
+ def is_internal(self, value):
59
+ self._is_internal.value = value
60
+
61
+ def to_dict(self):
62
+ return serialize(self)
63
+
64
+ def to_json(self):
65
+ return json.dumps(self.to_dict())
66
+
67
+ def __str__(self):
68
+ return self.to_json()
smartsheet/sheets.py CHANGED
@@ -30,7 +30,6 @@ from .models.summary_field import SummaryField
30
30
  from .types import TypedList
31
31
  from .util import deprecated
32
32
 
33
-
34
33
  class Sheets:
35
34
 
36
35
  """Class for handling Sheets operations."""
@@ -310,6 +309,7 @@ class Sheets:
310
309
 
311
310
  return response
312
311
 
312
+ @deprecated("Use sharing.delete_share instead")
313
313
  def delete_share(self, sheet_id, share_id):
314
314
  """Delete the specified Share.
315
315
 
@@ -319,6 +319,9 @@ class Sheets:
319
319
 
320
320
  Returns:
321
321
  Result
322
+
323
+ Deprecated:
324
+ Use sharing.delete_share instead with assetType=AssetType.SHEET
322
325
  """
323
326
  _op = fresh_operation("delete_share")
324
327
  _op["method"] = "DELETE"
@@ -470,6 +473,7 @@ class Sheets:
470
473
 
471
474
  return response
472
475
 
476
+ @deprecated("Use sharing.get_asset_share instead")
473
477
  def get_share(self, sheet_id, share_id):
474
478
  """Get the specified Share.
475
479
 
@@ -479,6 +483,9 @@ class Sheets:
479
483
 
480
484
  Returns:
481
485
  Share
486
+
487
+ Deprecated:
488
+ Use sharing.get_asset_share instead with assetType=AssetType.SHEET
482
489
  """
483
490
  _op = fresh_operation("get_share")
484
491
  _op["method"] = "GET"
@@ -991,6 +998,7 @@ class Sheets:
991
998
 
992
999
  return response
993
1000
 
1001
+ @deprecated("Use sharing.share_asset instead")
994
1002
  def share_sheet(self, sheet_id, share_obj, send_email=None):
995
1003
  """Share the specified Sheet.
996
1004
 
@@ -1006,6 +1014,9 @@ class Sheets:
1006
1014
 
1007
1015
  Returns:
1008
1016
  Result
1017
+
1018
+ Deprecated:
1019
+ Use sharing.share_asset instead with assetType=AssetType.SHEET
1009
1020
  """
1010
1021
  _op = fresh_operation("share_sheet")
1011
1022
  _op["method"] = "POST"
@@ -1120,6 +1131,7 @@ class Sheets:
1120
1131
 
1121
1132
  return response
1122
1133
 
1134
+ @deprecated("Use sharing.update_share instead")
1123
1135
  def update_share(self, sheet_id, share_id, share_obj):
1124
1136
  """Update the access level of a User or Group for the specified Sheet.
1125
1137
 
@@ -1130,6 +1142,9 @@ class Sheets:
1130
1142
 
1131
1143
  Returns:
1132
1144
  Result
1145
+
1146
+ Deprecated:
1147
+ Use sharing.update_share instead with assetType=AssetType.SHEET
1133
1148
  """
1134
1149
  if not all(val is not None for val in ["sheet_id", "share_id", "share_obj"]):
1135
1150
  raise ValueError(
smartsheet/users.py CHANGED
@@ -21,6 +21,7 @@ import logging
21
21
  from datetime import datetime
22
22
 
23
23
  from . import fresh_operation
24
+ from .models.enums.seat_type import SeatType
24
25
 
25
26
 
26
27
  class Users:
@@ -254,7 +255,8 @@ class Users:
254
255
  return response
255
256
 
256
257
  def list_users(
257
- self, email=None, page_size=None, page=None, include_all=None, include=None
258
+ self, email=None, page_size=None, page=None, include_all=None, include=None,
259
+ plan_id=None, seat_type=None
258
260
  ):
259
261
  """Get the list of Users in the organization.
260
262
 
@@ -268,6 +270,10 @@ class Users:
268
270
  (i.e. do not paginate).
269
271
  include(list[str]): optional include parameter, only current
270
272
  accepted value is 'lastLogin'
273
+ plan_id(int): optional plan_id parameter, returns users
274
+ in the selected plan.
275
+ seat_type(SeatType): optional seat_type parameter, filters users
276
+ by their seat type.
271
277
 
272
278
  Returns:
273
279
  IndexResult
@@ -280,6 +286,8 @@ class Users:
280
286
  _op["query_params"]["pageSize"] = page_size
281
287
  _op["query_params"]["page"] = page
282
288
  _op["query_params"]["includeAll"] = include_all
289
+ _op["query_params"]["planId"] = plan_id
290
+ _op["query_params"]["seatType"] = seat_type
283
291
 
284
292
  expected = ["IndexResult", "User"]
285
293
 
@@ -358,6 +366,91 @@ class Users:
358
366
 
359
367
  return response
360
368
 
369
+ def upgrade_user(self, user_id, plan_id, seat_type):
370
+ """Upgrades a user for a plan.
371
+
372
+ Args:
373
+ user_id (int): User ID
374
+ plan_id (int): Plan ID
375
+ seat_type (UpgradeSeatType): Seat type to upgrade to
376
+
377
+ Returns:
378
+ dict: Result
379
+ """
380
+ _op = fresh_operation("upgrade_user")
381
+ _op["method"] = "POST"
382
+ _op["path"] = f"/users/{user_id}/plans/{plan_id}/upgrade"
383
+ _op["json"] = {"seatType": seat_type}
384
+
385
+ expected = ["Result", None]
386
+
387
+ prepped_request = self._base.prepare_request(_op)
388
+ response = self._base.request(prepped_request, expected, _op)
389
+
390
+ return response
391
+
392
+ def downgrade_user(self, user_id, plan_id, seat_type):
393
+ """Downgrades a user for a plan.
394
+
395
+ Args:
396
+ user_id (int): User ID
397
+ plan_id (int): Plan ID
398
+ seat_type (DowngradeSeatType): Seat type to downgrade to
399
+
400
+ Returns:
401
+ dict: Result
402
+ """
403
+ _op = fresh_operation("downgrade_user")
404
+ _op["method"] = "POST"
405
+ _op["path"] = f"/users/{user_id}/plans/{plan_id}/downgrade"
406
+ _op["json"] = {"seatType": seat_type}
407
+
408
+ expected = ["Result", None]
409
+
410
+ prepped_request = self._base.prepare_request(_op)
411
+ response = self._base.request(prepped_request, expected, _op)
412
+
413
+ return response
414
+
415
+ def list_user_plans(self, user_id, last_key=None, max_items=None):
416
+ """List user's plans.
417
+ Args:
418
+ user_id (int): User ID
419
+ Returns:
420
+ TokenPaginatedResult
421
+ """
422
+ _op = fresh_operation("list_user_plans")
423
+ _op["method"] = "GET"
424
+ _op["path"] = f"/users/{user_id}/plans"
425
+ _op["query_params"]["lastKey"] = last_key
426
+ _op["query_params"]["maxItems"] = max_items
427
+
428
+ expected = ["TokenPaginatedResult", "UserPlan"]
429
+
430
+ prepped_request = self._base.prepare_request(_op)
431
+ response = self._base.request(prepped_request, expected, _op)
432
+
433
+ return response
434
+
435
+ def remove_user_from_plan(self, user_id, plan_id):
436
+ """Remove user from plan.
437
+ Args:
438
+ user_id (int): User ID
439
+ plan_id (int): Plan ID
440
+ Returns:
441
+ Result
442
+ """
443
+ _op = fresh_operation("remove_user_from_plan")
444
+ _op["method"] = "DELETE"
445
+ _op["path"] = f"/users/{user_id}/plans/{plan_id}"
446
+
447
+ expected = ["Result", None]
448
+
449
+ prepped_request = self._base.prepare_request(_op)
450
+ response = self._base.request(prepped_request, expected, _op)
451
+
452
+ return response
453
+
361
454
  def add_profile_image(self, user_id, file, file_type):
362
455
  """Uploads a profile image for the specified user.
363
456
 
smartsheet/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # file generated by setuptools_scm
2
2
  # don't change, don't track in version control
3
- __version__ = version = '3.1.0'
4
- __version_tuple__ = version_tuple = (3, 1, 0)
3
+ __version__ = version = '3.3.0'
4
+ __version_tuple__ = version_tuple = (3, 3, 0)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: smartsheet-python-sdk
3
- Version: 3.1.0
3
+ Version: 3.3.0
4
4
  Summary: Library that uses Python to connect to Smartsheet services (using API 2.0).
5
5
  Home-page: http://smartsheet-platform.github.io/api-docs/
6
6
  Author: Smartsheet
@@ -27,21 +27,33 @@ Requires-Dist: requests-toolbelt
27
27
  Requires-Dist: six>=1.9
28
28
  Requires-Dist: certifi
29
29
  Requires-Dist: python-dateutil
30
+ Provides-Extra: test
31
+ Requires-Dist: coverage; extra == "test"
32
+ Requires-Dist: coveralls; extra == "test"
33
+ Requires-Dist: pytest; extra == "test"
30
34
  Provides-Extra: develop
31
35
  Requires-Dist: coverage; extra == "develop"
32
36
  Requires-Dist: coveralls[yaml]; extra == "develop"
33
37
  Requires-Dist: pytest; extra == "develop"
34
38
  Requires-Dist: pytest-instafail; extra == "develop"
35
- Provides-Extra: test
36
- Requires-Dist: coverage; extra == "test"
37
- Requires-Dist: coveralls; extra == "test"
38
- Requires-Dist: pytest; extra == "test"
39
+ Dynamic: author
40
+ Dynamic: author-email
41
+ Dynamic: classifier
42
+ Dynamic: description
43
+ Dynamic: description-content-type
44
+ Dynamic: home-page
45
+ Dynamic: keywords
46
+ Dynamic: license
47
+ Dynamic: license-file
48
+ Dynamic: provides-extra
49
+ Dynamic: requires-dist
50
+ Dynamic: summary
39
51
 
40
52
  # Smartsheet Python SDK
41
53
 
42
54
  [![Build Status](https://github.com/smartsheet/smartsheet-python-sdk/actions/workflows/test-build.yaml/badge.svg)](https://github.com/smartsheet/smartsheet-python-sdk/actions/workflows/test-build.yaml) [![Coverage Status](https://coveralls.io/repos/github/smartsheet/smartsheet-python-sdk/badge.svg?branch=mainline)](https://coveralls.io/github/smartsheet/smartsheet-python-sdk?branch=mainline) [![PyPI version](https://badge.fury.io/py/smartsheet-python-sdk.svg)](https://badge.fury.io/py/smartsheet-python-sdk)
43
55
 
44
- A library for connecting to the [Smartsheet API](https://smartsheet.redoc.ly) from Python applications.
56
+ A library for connecting to the [Smartsheet API](https://developers.smartsheet.com/api/smartsheet/) from Python applications.
45
57
 
46
58
  ## Requirements
47
59
 
@@ -59,7 +71,7 @@ pip install smartsheet-python-sdk
59
71
 
60
72
  To get started with the Smartsheet Python SDK:
61
73
 
62
- 1. Set **SMARTSHEET_ACCESS_TOKEN** in your environment, using your Smartsheet API key. Find out more about [Authentication and Access Tokens](https://smartsheet.redoc.ly/#section/API-Basics/Authentication-and-Access-Tokens) in the Smartsheet API Documentation. You can generate an access token in Smartsheet UI under Account > Personal Settings > API Access.
74
+ 1. Set **SMARTSHEET_ACCESS_TOKEN** in your environment, using your Smartsheet API key. Find out more about [Authentication and Access Tokens](https://developers.smartsheet.com/api/smartsheet/guides/basics/authentication) in the Smartsheet API Documentation. You can generate an access token in Smartsheet UI under Account > Personal Settings > API Access.
63
75
 
64
76
  2. Install the Smartsheet Python SDK (see the installation instructions above)
65
77
 
@@ -84,7 +96,7 @@ Use the following resources to learn more about the SDK capabilities:
84
96
 
85
97
  1. [Smartsheet Python SDK sample project](https://github.com/smartsheet-samples/python-read-write-sheet)
86
98
  2. [Python SDK documentation](https://smartsheet.github.io/smartsheet-python-sdk/)
87
- 3. [Smartsheet API Documentation](https://smartsheet.redoc.ly)
99
+ 3. [Smartsheet API Documentation](https://developers.smartsheet.com/api/smartsheet/)
88
100
 
89
101
  ## Advanced Topics
90
102
 
@@ -1,4 +1,5 @@
1
1
  smartsheet/__init__.py,sha256=h2TD_nYTxqa7lcKb_mOIa-DMQN-pYaGk1Du0U3IVMyA,1152
2
+ smartsheet/asset_shares.py,sha256=ztkh5uQOLKHT2AkjRnm_3yDRbFFUzNdBSCZbL5FhLVA,5839
2
3
  smartsheet/attachments.py,sha256=eZ1y5jS_TJSyZzzapc68ol1qhrLxCXc2sY8l8oY1Gvo,17865
3
4
  smartsheet/cells.py,sha256=1BCBps0mV9FV_nmdtsP5j7jT0avTVIfbYSAhnOqzlwM,4845
4
5
  smartsheet/contacts.py,sha256=IBV3ncoP7R7GmzQI0H1CIwq4scGk9iBC1ayyQ927YrQ,2383
@@ -16,18 +17,18 @@ smartsheet/reports.py,sha256=0B5bdQwVJHwu-V04aMSJ-Y7HaILK4rgjjMtn0--kcig,12835
16
17
  smartsheet/search.py,sha256=ffy1dkVl3GtuYgCxvuR-vwahOBWIehGv_zwzLoJMimA,3394
17
18
  smartsheet/server.py,sha256=9wySsa_y_G-VO88tEHGHp919zRVFS0kCFIhiM6crWEU,1429
18
19
  smartsheet/session.py,sha256=TQ3IgVZ64r7Dszwo8rMISFezWxuwFYshhW9QhzoA428,2125
19
- smartsheet/sheets.py,sha256=0JVg4N3u3z9ngnIeRnjo8fUejfXhcQLYmQXCyw207dk,70150
20
+ smartsheet/sheets.py,sha256=nrqnvSz7ZqFi4f8lh6Xad5zEo8QrCtuMY0utzItnUHo,70797
20
21
  smartsheet/sights.py,sha256=IZgy8CJZBJ-pQo6vNwkDSBuoLCv5RAW39kNUMMNJ-oc,11569
21
22
  smartsheet/smartsheet.py,sha256=wOBejFgIh_xQu1KuIlh9ZAsq2OxG8EIWUqtBQpmz1y4,23408
22
23
  smartsheet/templates.py,sha256=z_Tj-4jZsu3RkLNbCAZWM2W05Zbio9T_uyU33rUPxzE,2898
23
24
  smartsheet/token.py,sha256=5uz-IG5adx_zr2-uepH-W8ATv0dq9aZNjYLeZNwldqI,4703
24
25
  smartsheet/types.py,sha256=aIdRJ89jwclmiZ4RH3hnZHJTFWFxgNKW3d8fghm21eM,9126
25
- smartsheet/users.py,sha256=3LyC7BsPLa3dAg5EXaGswgXq0O8s77nsE0sSkjLfRe8,12775
26
+ smartsheet/users.py,sha256=1KnqKJIzJEPMNy26BQY1b9jb3dItbzglrljV1MGD5ic,15887
26
27
  smartsheet/util.py,sha256=12Y6eluecB8k4Ns-at81AEM18ND2TCKa9bF4BlNRrKM,5633
27
- smartsheet/version.py,sha256=PYsCm3eHh5hgAf1b_gyIJMMHI2nMMwbcDKC3cw7zARs,160
28
+ smartsheet/version.py,sha256=gPQor6drMcQZQs-T7xihCzC2lsOxfbNmH7QSOdvawII,160
28
29
  smartsheet/webhooks.py,sha256=7F7g4Ks0GyS3QxsNWm1SFtrOr00jBisCjj7-hcToHM8,4637
29
30
  smartsheet/workspaces.py,sha256=r81xh3HfYsX--ll5pQ-h7kSSJELokYV-bSjuD0WloeU,22651
30
- smartsheet/models/__init__.py,sha256=8Jq9aT_mTbqla7BDuHCiTDB1mhATq0TbNFKQGgaxgcc,4722
31
+ smartsheet/models/__init__.py,sha256=4P6wKY8TpbV_rI5Z5c1ifxiwJEWL5bsvecVcjtUSJ9U,4754
31
32
  smartsheet/models/access_token.py,sha256=sKHL5cFRWPTjymX06ZIXaCDp8ZJQEVpXN8mns1DAvGM,2564
32
33
  smartsheet/models/account.py,sha256=nLg_5O4Vnc7aNf9p1kIcsgdAm23IC2H7cKkxjLxwS9U,1941
33
34
  smartsheet/models/alternate_email.py,sha256=n8zqWkY-uzSw_CVKBvYUc6pGSR0v4yTx8S5PaIiX_AU,2263
@@ -131,10 +132,11 @@ smartsheet/models/string_object_value.py,sha256=GPMIAA1utIefw4VVsHWcT5y5GBK9Z9FC
131
132
  smartsheet/models/summary_field.py,sha256=QdVYD2XleUKkprVAxOJ6dfTbZo8w7sSTj2p_wj2Ue2E,6341
132
133
  smartsheet/models/template.py,sha256=Up5yM3Q02-8QM8j74_WWWN-AwCValM3xnAiOzmmQiDE,4207
133
134
  smartsheet/models/title_rich_text_widget_content.py,sha256=zdHd_RdPPO7flnOmKqIkkqo_CSDtOg0Z4hj0vAK7-ZU,2018
134
- smartsheet/models/token_paginated_result.py,sha256=OHn8mqEiLirKhBn8mWi0QvxwJryVtQtNvGd7-8lqfhc,1841
135
+ smartsheet/models/token_paginated_result.py,sha256=gfdLwahCrG7kTRMVvoXe78jqYdw6TeZEVbnKqUPwCqc,2297
135
136
  smartsheet/models/update_request.py,sha256=5CkaSfhPLUPqtU6O9EuwFsyccpeBB3rnLLtvyxPmrpM,2881
136
137
  smartsheet/models/user.py,sha256=CKMjNusL7_TU0V07vqoxruL6gQbXHctBNItJJIsSQHI,1553
137
- smartsheet/models/user_model.py,sha256=OPwJlCZ7RIB7ghRE6YuvNPw_vRaygKYkYh0zgPH_Mm4,6139
138
+ smartsheet/models/user_model.py,sha256=dVJp2mvtiUH-qi5rQX42S_7kPywyMaMnRkpNTv7-lTw,6910
139
+ smartsheet/models/user_plan.py,sha256=WbZUzvl8GDIaUskqJU6g-ROMgIuFSQN4PjZAqxeOiUg,1696
138
140
  smartsheet/models/user_profile.py,sha256=vKVL2XkFdO9l2RGZRRcpiASjek1q-Ffee7x4z53SLtE,2341
139
141
  smartsheet/models/version.py,sha256=gC8YvEjB-RO9avvz3sG2lDHrDkMi0i-o9SP8h5vLrbY,1540
140
142
  smartsheet/models/web_content_widget_content.py,sha256=N_2HEOsWLI6D3s6vGZV_qCsVEEe3xkxeK9xUAP4SqCI,1719
@@ -146,8 +148,9 @@ smartsheet/models/widget.py,sha256=G5UKR1latGSuXqm-MCRQxn9W7IJgo2FsUWJ9heEW0RA,6
146
148
  smartsheet/models/widget_content.py,sha256=hxv3DJWO8YPe4ND-HUZ59eOVU9LAy02owU-KQVWUsDU,1525
147
149
  smartsheet/models/widget_hyperlink.py,sha256=JPjaSftHFHiFj48tfOckGWzrew_CLKmE2k9lUA_RQSk,2059
148
150
  smartsheet/models/workspace.py,sha256=_YT4i4DEK32kEyqlWixZUQSQyBiZkNtwtSmuhc98H2s,4522
149
- smartsheet/models/enums/__init__.py,sha256=IcAbtVOBw57xrIeuKgQK2pvyZKildMKFko0AG0DqeP8,2254
151
+ smartsheet/models/enums/__init__.py,sha256=qDpcuk-xU4jVTvwgD6aWz8hUM02hOZbiRNDfMLSniQM,2356
150
152
  smartsheet/models/enums/access_level.py,sha256=LvKh3Z2LrFeLm-R-dT0qOVinBsA4jEOxM02flg0LFaY,816
153
+ smartsheet/models/enums/asset_type.py,sha256=hrNXZDk_mme57f-0wO86mk_RwzNP8zkb9h7GAEZbhjQ,253
151
154
  smartsheet/models/enums/attachment_parent_type.py,sha256=EFcrHg8xpx_ZxrrGb3vkk9Ji8PD74Q8GeWhXZMquVEw,770
152
155
  smartsheet/models/enums/attachment_sub_type.py,sha256=wZEo80LynIFDFZkTHCpQx5T-G5deT9HSRBMRdvHyh7Q,826
153
156
  smartsheet/models/enums/attachment_type.py,sha256=2c7TXc22Vzwq-8BG8rvEfqOpe29njT27otogdfVidwc,869
@@ -170,6 +173,7 @@ smartsheet/models/enums/paper_type.py,sha256=vh0VrF6G9xB5Kdt979I51wulnTqYl8hMrXo
170
173
  smartsheet/models/enums/predecessor_type.py,sha256=CB2oX7xbjAV8RjzkTCSHTKVWvzvCkwZLa21jBQLjotA,767
171
174
  smartsheet/models/enums/publish_accessible_by.py,sha256=x5z2CCHttwprcyV7XL0AN39E1h7OIUMpe_Fei5HpBGo,751
172
175
  smartsheet/models/enums/schedule_type.py,sha256=KtTpdD3oKlntmk1Nl2i3ymIfGW6CP3I_7mi7vrVTCZc,793
176
+ smartsheet/models/enums/seat_type.py,sha256=5kaFtJPpescgCtnbXg4JM6H35UQKh-eeSWBFlaBkbE4,318
173
177
  smartsheet/models/enums/share_scope.py,sha256=LEZnBQjBGnFIHVHrX_FsG-sndGK-XsfqDhPeY7oZPWs,749
174
178
  smartsheet/models/enums/share_type.py,sha256=89e8ki-mlH3i8qEjFKnqBEK-GUEipFItOE5rhED39bg,744
175
179
  smartsheet/models/enums/sheet_email_format.py,sha256=St0FcwbnnkPQa0ZqlwnkQ44XxineojE-XtZmZd7_B9U,768
@@ -181,9 +185,9 @@ smartsheet/models/enums/system_column_type.py,sha256=UfhNUBGD_0K1Pas7fujGEuax55O
181
185
  smartsheet/models/enums/update_request_status.py,sha256=xYF84x1dTFhJMYVi1q3G1T9u1IGN3szlR1jj5HHC0hE,777
182
186
  smartsheet/models/enums/user_status.py,sha256=SB7qRcA0dhdRimsOKHCGF3CB6fL0XuifxQEWZGNNS8Q,766
183
187
  smartsheet/models/enums/widget_type.py,sha256=VfVq59fLZsT4ks_ZBrtv52u2Cl60iAdlA6mGD_elz-k,1072
184
- smartsheet_python_sdk-3.1.0.dist-info/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
185
- smartsheet_python_sdk-3.1.0.dist-info/METADATA,sha256=GZlKD4SFsKPNebCR2JaZHby28GDwJhgVntp1TMQMXyM,4693
186
- smartsheet_python_sdk-3.1.0.dist-info/NOTICE,sha256=mXr2ryVjnCjykeW0J79kFfVXQG_Z9SV4BV_QPNENW1U,420
187
- smartsheet_python_sdk-3.1.0.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
188
- smartsheet_python_sdk-3.1.0.dist-info/top_level.txt,sha256=kozWEYiKjyJmSXzd6p5ugkQ5bhoHS9V3NnvLagUfcNw,11
189
- smartsheet_python_sdk-3.1.0.dist-info/RECORD,,
188
+ smartsheet_python_sdk-3.3.0.dist-info/licenses/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
189
+ smartsheet_python_sdk-3.3.0.dist-info/licenses/NOTICE,sha256=mXr2ryVjnCjykeW0J79kFfVXQG_Z9SV4BV_QPNENW1U,420
190
+ smartsheet_python_sdk-3.3.0.dist-info/METADATA,sha256=vtEVUHYsmSPTVCq_SkmyRJTKmq9nTBn_DW8EoZmYFbs,4987
191
+ smartsheet_python_sdk-3.3.0.dist-info/WHEEL,sha256=AeO2BvogYWm3eGaHCvhzmUYt8ia7KfURiHzO_1atlys,109
192
+ smartsheet_python_sdk-3.3.0.dist-info/top_level.txt,sha256=kozWEYiKjyJmSXzd6p5ugkQ5bhoHS9V3NnvLagUfcNw,11
193
+ smartsheet_python_sdk-3.3.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.45.1)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any