TM1py 2.2.2__tar.gz → 2.2.3__tar.gz

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 (78) hide show
  1. {tm1py-2.2.2 → tm1py-2.2.3}/PKG-INFO +1 -1
  2. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ElementService.py +6 -3
  3. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/FileService.py +17 -1
  4. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py.egg-info/PKG-INFO +1 -1
  5. {tm1py-2.2.2 → tm1py-2.2.3}/pyproject.toml +1 -1
  6. {tm1py-2.2.2 → tm1py-2.2.3}/LICENSE +0 -0
  7. {tm1py-2.2.2 → tm1py-2.2.3}/README.md +0 -0
  8. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Exceptions/Exceptions.py +0 -0
  9. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Exceptions/__init__.py +0 -0
  10. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Annotation.py +0 -0
  11. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Application.py +0 -0
  12. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Axis.py +0 -0
  13. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Chore.py +0 -0
  14. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/ChoreFrequency.py +0 -0
  15. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/ChoreStartTime.py +0 -0
  16. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/ChoreTask.py +0 -0
  17. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Cube.py +0 -0
  18. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Dimension.py +0 -0
  19. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Element.py +0 -0
  20. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/ElementAttribute.py +0 -0
  21. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Git.py +0 -0
  22. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/GitCommit.py +0 -0
  23. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/GitPlan.py +0 -0
  24. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/GitProject.py +0 -0
  25. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/GitRemote.py +0 -0
  26. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Hierarchy.py +0 -0
  27. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/MDXView.py +0 -0
  28. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/NativeView.py +0 -0
  29. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Process.py +0 -0
  30. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/ProcessDebugBreakpoint.py +0 -0
  31. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Rules.py +0 -0
  32. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Sandbox.py +0 -0
  33. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Server.py +0 -0
  34. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/Subset.py +0 -0
  35. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/TM1Object.py +0 -0
  36. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/User.py +0 -0
  37. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/View.py +0 -0
  38. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Objects/__init__.py +0 -0
  39. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/AnnotationService.py +0 -0
  40. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ApplicationService.py +0 -0
  41. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/AuditLogService.py +0 -0
  42. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/CellService.py +0 -0
  43. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ChoreService.py +0 -0
  44. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ConfigurationService.py +0 -0
  45. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/CubeService.py +0 -0
  46. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/DimensionService.py +0 -0
  47. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/GitService.py +0 -0
  48. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/HierarchyService.py +0 -0
  49. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/JobService.py +0 -0
  50. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/LoggerService.py +0 -0
  51. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ManageService.py +0 -0
  52. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/MessageLogService.py +0 -0
  53. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/MonitoringService.py +0 -0
  54. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ObjectService.py +0 -0
  55. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/PowerBiService.py +0 -0
  56. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ProcessService.py +0 -0
  57. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/RestService.py +0 -0
  58. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/SandboxService.py +0 -0
  59. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/SecurityService.py +0 -0
  60. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ServerService.py +0 -0
  61. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/SessionService.py +0 -0
  62. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/SubsetService.py +0 -0
  63. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/TM1Service.py +0 -0
  64. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ThreadService.py +0 -0
  65. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/TransactionLogService.py +0 -0
  66. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/UserService.py +0 -0
  67. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/ViewService.py +0 -0
  68. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Services/__init__.py +0 -0
  69. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Utils/MDXUtils.py +0 -0
  70. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Utils/Utils.py +0 -0
  71. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/Utils/__init__.py +0 -0
  72. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py/__init__.py +0 -0
  73. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py.egg-info/SOURCES.txt +0 -0
  74. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py.egg-info/dependency_links.txt +0 -0
  75. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py.egg-info/requires.txt +0 -0
  76. {tm1py-2.2.2 → tm1py-2.2.3}/TM1py.egg-info/top_level.txt +0 -0
  77. {tm1py-2.2.2 → tm1py-2.2.3}/setup.cfg +0 -0
  78. {tm1py-2.2.2 → tm1py-2.2.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TM1py
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Summary: A python module for TM1.
5
5
  Author-email: Marius Wirtz <MWirtz@cubewise.com>
6
6
  License: MIT
@@ -1187,7 +1187,7 @@ class ElementService(ObjectService):
1187
1187
  to return, can be None or empty
1188
1188
  :param element_properties: list of element properties (e.g., Name, UniqueName, Type, Level, Index,
1189
1189
  Attributes/Color) to return, can be empty
1190
- :return: dictionary of members, unique names, weights, types, and parents
1190
+ :return: dictionary of members, unique names, weights, types, and parents or async id when return_async_id is True
1191
1191
  """
1192
1192
 
1193
1193
  top = f"$top={top_records};" if top_records else ""
@@ -1241,8 +1241,11 @@ class ElementService(ObjectService):
1241
1241
 
1242
1242
  payload = {"MDX": mdx}
1243
1243
  response = self._rest.POST(url, json.dumps(payload, ensure_ascii=False), **kwargs)
1244
- raw_dict = response.json()
1245
- return [tuples["Members"] for tuples in raw_dict["Tuples"]]
1244
+ if kwargs.get("return_async_id", False):
1245
+ return response
1246
+ else:
1247
+ raw_dict = response.json()
1248
+ return [tuples["Members"] for tuples in raw_dict["Tuples"]]
1246
1249
 
1247
1250
  def remove_edge(self, dimension_name: str, hierarchy_name: str, parent: str, component: str, **kwargs) -> Response:
1248
1251
  """Remove one edge from hierarchy. Fails if parent or child element doesn't exist.
@@ -78,9 +78,25 @@ class FileService(ObjectService):
78
78
  path = Path(folder_name)
79
79
  url = self._construct_content_url(path, exclude_path_end=True, extension="Contents")
80
80
 
81
- body = {"@odata.type": "#ibm.tm1.api.v1.Folder", "Name": folder_name.name}
81
+ body = {"@odata.type": "#ibm.tm1.api.v1.Folder", "Name": path.name}
82
82
  self._rest.POST(url, json.dumps(body), **kwargs)
83
83
 
84
+ @require_version(version="12")
85
+ def create_folder(self, folder_name: Union[str, Path], **kwargs):
86
+ """Create folder(s)
87
+
88
+ Supports recursive creation (e.g., 'folderA/folderB/folderC')
89
+
90
+ :param folder_name: folder name or path to nested folders
91
+ :return: None
92
+ """
93
+ path = Path(folder_name)
94
+ folder_path = Path()
95
+ for part in path.parts:
96
+ folder_path = folder_path.joinpath(part)
97
+ if not self.exists(folder_path, **kwargs):
98
+ self._create_folder(folder_name=folder_path, **kwargs)
99
+
84
100
  def _construct_content_url(self, path: Path, exclude_path_end: bool = True, extension: str = "Contents") -> str:
85
101
  """Dynamically construct URL to use in FileService functions
86
102
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TM1py
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Summary: A python module for TM1.
5
5
  Author-email: Marius Wirtz <MWirtz@cubewise.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "TM1py"
7
- version = "2.2.2"
7
+ version = "2.2.3"
8
8
  description = "A python module for TM1."
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes