myabcm-corporate-client-api 0.1.0__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.
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
@@ -0,0 +1,174 @@
1
+ Metadata-Version: 2.2
2
+ Name: myabcm_corporate_client_api
3
+ Version: 0.1.0
4
+ Summary: MyABCM Corporate Python Client API
5
+ Author-email: Clovis Ribeiro <clovis.ribeiro@myabcm.com>, Luiz Guilherme Oliveira <luiz.oliveira@myabcm.com>
6
+ License: LGPL-3.0-only
7
+ Project-URL: Homepage, https://www.myabcm.com
8
+ Project-URL: Repository, https://github.com/myabcm/corporate-python-client-api
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: requests>=2.32.3
16
+
17
+ # MyABCM Corporate Python client API
18
+
19
+
20
+ ## Overview
21
+
22
+ MyABCM Corporate (v12 or newer) provides a simple and extensive REST API for end users to connect and control MyABCM from other languages.
23
+
24
+ The purpose of this package is to simplify the usage of MyABCM Corporate REST API by wrapping the most common calls in a simple to use Python class.
25
+
26
+
27
+
28
+ ## A bit of history
29
+
30
+ MyABCM Corporate since its first versions, provided a REST API so users could control it from external systems/programs.
31
+
32
+ To make the use of the REST API simpler, MyABCM even released a command line utility named "MyABCM.Client.Shell" that used the provided REST API to control the basic functions of MyABCM Corporate.
33
+
34
+ The initial goal of "MyABCM.Client.Shell" was to serve as a simple example of the potential of MyABCM Corporate API but many users ended up using the utility in production to automate processes like model imports, calculation and fact/cube generation.
35
+
36
+ MyABCM.Client.Shell certainly served its purpose, but it is limited in flexibility as it does not implement the functionality of a full scripting language. Due to that limitation came the idea of implementing a Python package that could wrap around MyABCM Corporate REST API and make it easier for end users to control MyABCM Corporate from Python scripts.
37
+
38
+
39
+
40
+ ## How does it work?
41
+
42
+ This package implements a single class named **CorporateServer** that implements multiple methods to control MyABCM Corporate.
43
+
44
+ Here is a simple example of a Python script to connect to MyABCM and calculate a model:
45
+
46
+ ```python
47
+ from myabcm_corporate_client_api import CorporateServer
48
+
49
+ # Create a new instance of CorporateServer class with the provided servername and credentials
50
+ corporate_server = CorporateServer("https://corporate.my-company.com/proxy", "user123", "myabcm123")
51
+
52
+ # Logon to MyABCM Corporate
53
+ corporate_server.logon()
54
+
55
+ # Select a model
56
+ corporate_server.select_model("MY-MODEL-REFERENCE-ABC")
57
+
58
+ # Execute calculation
59
+ corporate_server.calculate_model("JAN2025", "ACTUAL" , False):
60
+
61
+ # Logoff from MyABCM Corporate
62
+ corporate_server.logoff()
63
+ ```
64
+
65
+ ## Methods provided by the CorporateServer class
66
+
67
+ Here are all methods exposed by the CorporateServer class. Additional details on the parameters required for each method can be obtained directly from most Python code editors as the source code of the package is fully documented using *Docstrings*.
68
+
69
+ &nbsp;
70
+ &nbsp;
71
+
72
+ > With the exception of **process_fact_associations**, all other methods are executed synchronously. This means if you call a method like **execute_import**, **execute_export** or any other method that executes as an operation in the server, the call will block until the operation ends.
73
+
74
+ &nbsp;
75
+ &nbsp;
76
+
77
+ **Logon/logoff methods**
78
+
79
+ Method | Description
80
+ --- |---
81
+ logon | Logon to the Corporate server informed in the class constructor
82
+ logoff | Logoff from the server
83
+
84
+ &nbsp;
85
+ &nbsp;
86
+
87
+ **Model related methods**
88
+
89
+ Method | Description
90
+ --- |---
91
+ model_exists | Check if a model exists
92
+ select_model | Select a model
93
+ remove_model | Remove a model
94
+ add_model | Add a new model
95
+ calculate_model | Calculate a specific association
96
+ reset_association | Reset an existing association
97
+ remove_cubes_from_olap_server | Remove ALL cubes from OLAP Server (tabular and SSAS)
98
+
99
+ &nbsp;
100
+ &nbsp;
101
+
102
+ **File store related methods**
103
+
104
+ Method | Description
105
+ --- |---
106
+ upload_file | Upload a local file to the server
107
+ download_file | Download a file from server
108
+ file_exists | Check if a file exists in the user's file store
109
+ remove_file | Remove a file from user's file store
110
+
111
+ &nbsp;
112
+ &nbsp;
113
+
114
+ **Import related methods**
115
+
116
+ Method | Description
117
+ --- |---
118
+ import_exists | Check if an import exists
119
+ add_import | Add a new import
120
+ remove_import | Remove an import
121
+ execute_import | Execute import
122
+
123
+ &nbsp;
124
+ &nbsp;
125
+
126
+
127
+ **Export related methods**
128
+
129
+ Method | Description
130
+ --- |---
131
+ add_export | Add a new export
132
+ remove_export | Remove an export
133
+ execute_export | Execute an export
134
+
135
+ &nbsp;
136
+ &nbsp;
137
+
138
+ **Scripts related methods**
139
+
140
+ Method | Description
141
+ --- |---
142
+ add_script | Add a new script
143
+ remove_script | Remove script
144
+ execute_script | Execute script
145
+ add_md_cube_to_script | Add a multidimensional cube to a script
146
+ add_tb_cube_to_script | Add a tabular cube to a script
147
+ add_export_to_script | Add an export to a script
148
+ add_import_to_script | Add an import to a script
149
+ add_model_calculation_to_script | Add a calculate model operation to a script
150
+ add_etlx_file_to_script | Add an ETLX package processing operation to a script
151
+ add_etlx_database_to_script | Add an ETLX(Database) package processing operation to a script
152
+ add_fact_to_script | Add a fact processing operation to a script
153
+
154
+ &nbsp;
155
+ &nbsp;
156
+
157
+ **Fact related methods**
158
+
159
+ Method | Description
160
+ --- |---
161
+ add_fact_associations | Add new associations to a fact
162
+ remove_fact_associations | Remove associations to a fact
163
+ process_fact_associations | Process a fact association
164
+ process_fact | Process all fact associations
165
+
166
+ &nbsp;
167
+ &nbsp;
168
+
169
+ **Cube related methods**
170
+
171
+ Method | Description
172
+ --- |---
173
+ process_regular_cube | Process a regular (SSAS) cube
174
+ process_tabular_cube | Process a tabular cube
@@ -0,0 +1,158 @@
1
+ # MyABCM Corporate Python client API
2
+
3
+
4
+ ## Overview
5
+
6
+ MyABCM Corporate (v12 or newer) provides a simple and extensive REST API for end users to connect and control MyABCM from other languages.
7
+
8
+ The purpose of this package is to simplify the usage of MyABCM Corporate REST API by wrapping the most common calls in a simple to use Python class.
9
+
10
+
11
+
12
+ ## A bit of history
13
+
14
+ MyABCM Corporate since its first versions, provided a REST API so users could control it from external systems/programs.
15
+
16
+ To make the use of the REST API simpler, MyABCM even released a command line utility named "MyABCM.Client.Shell" that used the provided REST API to control the basic functions of MyABCM Corporate.
17
+
18
+ The initial goal of "MyABCM.Client.Shell" was to serve as a simple example of the potential of MyABCM Corporate API but many users ended up using the utility in production to automate processes like model imports, calculation and fact/cube generation.
19
+
20
+ MyABCM.Client.Shell certainly served its purpose, but it is limited in flexibility as it does not implement the functionality of a full scripting language. Due to that limitation came the idea of implementing a Python package that could wrap around MyABCM Corporate REST API and make it easier for end users to control MyABCM Corporate from Python scripts.
21
+
22
+
23
+
24
+ ## How does it work?
25
+
26
+ This package implements a single class named **CorporateServer** that implements multiple methods to control MyABCM Corporate.
27
+
28
+ Here is a simple example of a Python script to connect to MyABCM and calculate a model:
29
+
30
+ ```python
31
+ from myabcm_corporate_client_api import CorporateServer
32
+
33
+ # Create a new instance of CorporateServer class with the provided servername and credentials
34
+ corporate_server = CorporateServer("https://corporate.my-company.com/proxy", "user123", "myabcm123")
35
+
36
+ # Logon to MyABCM Corporate
37
+ corporate_server.logon()
38
+
39
+ # Select a model
40
+ corporate_server.select_model("MY-MODEL-REFERENCE-ABC")
41
+
42
+ # Execute calculation
43
+ corporate_server.calculate_model("JAN2025", "ACTUAL" , False):
44
+
45
+ # Logoff from MyABCM Corporate
46
+ corporate_server.logoff()
47
+ ```
48
+
49
+ ## Methods provided by the CorporateServer class
50
+
51
+ Here are all methods exposed by the CorporateServer class. Additional details on the parameters required for each method can be obtained directly from most Python code editors as the source code of the package is fully documented using *Docstrings*.
52
+
53
+ &nbsp;
54
+ &nbsp;
55
+
56
+ > With the exception of **process_fact_associations**, all other methods are executed synchronously. This means if you call a method like **execute_import**, **execute_export** or any other method that executes as an operation in the server, the call will block until the operation ends.
57
+
58
+ &nbsp;
59
+ &nbsp;
60
+
61
+ **Logon/logoff methods**
62
+
63
+ Method | Description
64
+ --- |---
65
+ logon | Logon to the Corporate server informed in the class constructor
66
+ logoff | Logoff from the server
67
+
68
+ &nbsp;
69
+ &nbsp;
70
+
71
+ **Model related methods**
72
+
73
+ Method | Description
74
+ --- |---
75
+ model_exists | Check if a model exists
76
+ select_model | Select a model
77
+ remove_model | Remove a model
78
+ add_model | Add a new model
79
+ calculate_model | Calculate a specific association
80
+ reset_association | Reset an existing association
81
+ remove_cubes_from_olap_server | Remove ALL cubes from OLAP Server (tabular and SSAS)
82
+
83
+ &nbsp;
84
+ &nbsp;
85
+
86
+ **File store related methods**
87
+
88
+ Method | Description
89
+ --- |---
90
+ upload_file | Upload a local file to the server
91
+ download_file | Download a file from server
92
+ file_exists | Check if a file exists in the user's file store
93
+ remove_file | Remove a file from user's file store
94
+
95
+ &nbsp;
96
+ &nbsp;
97
+
98
+ **Import related methods**
99
+
100
+ Method | Description
101
+ --- |---
102
+ import_exists | Check if an import exists
103
+ add_import | Add a new import
104
+ remove_import | Remove an import
105
+ execute_import | Execute import
106
+
107
+ &nbsp;
108
+ &nbsp;
109
+
110
+
111
+ **Export related methods**
112
+
113
+ Method | Description
114
+ --- |---
115
+ add_export | Add a new export
116
+ remove_export | Remove an export
117
+ execute_export | Execute an export
118
+
119
+ &nbsp;
120
+ &nbsp;
121
+
122
+ **Scripts related methods**
123
+
124
+ Method | Description
125
+ --- |---
126
+ add_script | Add a new script
127
+ remove_script | Remove script
128
+ execute_script | Execute script
129
+ add_md_cube_to_script | Add a multidimensional cube to a script
130
+ add_tb_cube_to_script | Add a tabular cube to a script
131
+ add_export_to_script | Add an export to a script
132
+ add_import_to_script | Add an import to a script
133
+ add_model_calculation_to_script | Add a calculate model operation to a script
134
+ add_etlx_file_to_script | Add an ETLX package processing operation to a script
135
+ add_etlx_database_to_script | Add an ETLX(Database) package processing operation to a script
136
+ add_fact_to_script | Add a fact processing operation to a script
137
+
138
+ &nbsp;
139
+ &nbsp;
140
+
141
+ **Fact related methods**
142
+
143
+ Method | Description
144
+ --- |---
145
+ add_fact_associations | Add new associations to a fact
146
+ remove_fact_associations | Remove associations to a fact
147
+ process_fact_associations | Process a fact association
148
+ process_fact | Process all fact associations
149
+
150
+ &nbsp;
151
+ &nbsp;
152
+
153
+ **Cube related methods**
154
+
155
+ Method | Description
156
+ --- |---
157
+ process_regular_cube | Process a regular (SSAS) cube
158
+ process_tabular_cube | Process a tabular cube
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "myabcm_corporate_client_api"
7
+
8
+ version = "0.1.0"
9
+
10
+ authors = [
11
+ { name="Clovis Ribeiro", email="clovis.ribeiro@myabcm.com" },
12
+ { name="Luiz Guilherme Oliveira", email="luiz.oliveira@myabcm.com" }]
13
+
14
+ description = "MyABCM Corporate Python Client API"
15
+
16
+ readme = "README.md"
17
+
18
+ requires-python = ">=3.8"
19
+
20
+ classifiers = [
21
+ "Programming Language :: Python :: 3",
22
+ "Operating System :: OS Independent",
23
+ "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)"]
24
+
25
+ license = { text= "LGPL-3.0-only" }
26
+
27
+ dependencies = [
28
+ "requests>=2.32.3"]
29
+
30
+ [project.urls]
31
+ Homepage = "https://www.myabcm.com"
32
+ Repository = "https://github.com/myabcm/corporate-python-client-api"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ from .corporate_server_module import CorporateServer