0% found this document useful (0 votes)
553 views

TM 1 Py

The document summarizes the TM1py module, which provides a Python interface for interacting with TM1 databases. It contains classes for objects like cubes, dimensions, subsets, and processes that simplify working with the TM1 REST API. The module is organized into subpackages for exceptions, objects, services, and utilities.

Uploaded by

pourush gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
553 views

TM 1 Py

The document summarizes the TM1py module, which provides a Python interface for interacting with TM1 databases. It contains classes for objects like cubes, dimensions, subsets, and processes that simplify working with the TM1 REST API. The module is organized into subpackages for exceptions, objects, services, and utilities.

Uploaded by

pourush gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

TM1py Documentation

Release 1.0.2

Marius Wirtz, Cubewise CODE

Mar 24, 2019


Contents

1 Module contents 1

2 Subpackages 3
2.1 TM1py.Exceptions package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 TM1py.Objects package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 TM1py.Services package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4 TM1py.Utils package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Python Module Index 51

i
ii
CHAPTER 1

Module contents

A python module for TM1.


https://github.com/cubewise-code/TM1py
TM1py wraps the TM1 REST API into concise Python classes and Services that simplify TM1 interactions from
python.
Usage: >>> with RESTService(address=’‘, port=8001, user=’admin’, password=’apple’, ssl=False) as tm1_rest: >>>
subset_service = SubsetService(tm1_rest) >>> subset = Subset(dimension_name=’Month’, subset_name=’Q1’, ele-
ments=[‘Jan’, ‘Feb’, ‘Mar’]) >>> subset_service.create(subset, private=True)

1
TM1py Documentation, Release 1.0.2

2 Chapter 1. Module contents


CHAPTER 2

Subpackages

2.1 TM1py.Exceptions package

2.1.1 Submodules

2.1.2 TM1py.Exceptions.Exceptions module

exception TM1py.Exceptions.Exceptions.TM1pyException(response, status_code, reason)


Bases: exceptions.Exception
The default exception for TM1py
reason
response
status_code

3
TM1py Documentation, Release 1.0.2

2.1.3 Module contents

2.2 TM1py.Objects package

2.2.1 Submodules

2.2.2 TM1py.Objects.Annotation module

class TM1py.Objects.Annotation.Annotation(comment_value, object_name,


dimensional_context, com-
ment_type=’ANNOTATION’, annota-
tion_id=None, text=”, creator=None,
created=None, last_updated_by=None,
last_updated=None)
Bases: TM1py.Objects.TM1Object.TM1Object
Abtraction of TM1 Annotation
Notes
• Class complete, functional and tested.
• doesn’t cover Attachments though
body
comment_value
created
dimensional_context
classmethod from_json(annotation_as_json)
Alternative constructor
Parameters annotation_as_json – String, JSON
Returns instance of TM1py.Process
id
last_updated
last_updated_by
move(dimension_order, dimension, target_element, source_element=None)
Move annotation on given dimension from source_element to target_element
Parameters
• dimension_order – List, order of the dimensions in the cube
• dimension – dimension name
• target_element – target element name
• source_element – source element name
Returns
object_name
text

4 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

2.2.3 TM1py.Objects.Application module

class TM1py.Objects.Application.Application(path, content)


Bases: TM1py.Objects.TM1Object.TM1Object
to_xlsx(path_to_file)

2.2.4 TM1py.Objects.Axis module

class TM1py.Objects.Axis.ViewAxisSelection(dimension_name, subset)


Bases: TM1py.Objects.TM1Object.TM1Object
Describes what is selected in a dimension on an axis. Can be a Registered Subset or an Anonymous Subset
body
body_as_dict
dimension_name
hierarchy_name
subset
class TM1py.Objects.Axis.ViewTitleSelection(dimension_name, subset, selected)
Describes what is selected in a dimension on the view title. Can be a Registered Subset or an Anonymous Subset

body
dimension_name
hierarchy_name
selected
subset

2.2.5 TM1py.Objects.Chore module

class TM1py.Objects.Chore.Chore(name, start_time, dst_sensitivity, active, execution_mode, fre-


quency, tasks)
Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of TM1 Chore
activate()
active
add_task(task)
body
body_as_dict
construct_body()
construct self.body (json) from the class attributes :return: String, TM1 JSON representation of a chore
deactivate()
dst_sensitivity
execution_mode

2.2. TM1py.Objects package 5


TM1py Documentation, Release 1.0.2

frequency
classmethod from_dict(chore_as_dict)
Alternative constructor
Parameters chore_as_dict – Chore as dict
Returns Chore, an instance of this class
classmethod from_json(chore_as_json)
Alternative constructor
Parameters chore_as_json – string, JSON. Response of
/api/v1/Chores(‘x’)/Tasks?$expand=*
Returns Chore, an instance of this class
name
reschedule(days=0, hours=0, minutes=0, seconds=0)
start_time
tasks

2.2.6 TM1py.Objects.ChoreFrequency module

class TM1py.Objects.ChoreFrequency.ChoreFrequency(days, hours, minutes, seconds)


Bases: TM1py.Objects.TM1Object.TM1Object
Utility class to handle time representation fore Chore Frequency
days
frequency_string
classmethod from_string(frequency_string)
hours
minutes
seconds

2.2.7 TM1py.Objects.ChoreStartTime module

class TM1py.Objects.ChoreStartTime.ChoreStartTime(year, month, day, hour, minute, sec-


ond)
Bases: TM1py.Objects.TM1Object.TM1Object
Utility class to handle time representation for Chore Start Time
add(days=0, hours=0, minutes=0, seconds=0)
classmethod from_string(start_time_string)
set_time(year=None, month=None, day=None, hour=None, minute=None, second=None)
start_time_string
substract(days=0, hours=0, minutes=0, seconds=0)

6 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

2.2.8 TM1py.Objects.ChoreTask module

class TM1py.Objects.ChoreTask.ChoreTask(step, process_name, parameters)


Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of a Chore Task
A Chore task always conistst of - The step integer ID: it’s order in the execution plan.
1 to n, where n is the last Process in the Chore

• The name of the process to execute


• The parameters for the process

body
body_as_dict
classmethod from_dict(chore_task_as_dict)
parameters
process_name
step

2.2.9 TM1py.Objects.Cube module

class TM1py.Objects.Cube.Cube(name, dimensions, rules=None)


Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of a TM1 Cube
body
dimensions
feedstrings
classmethod from_dict(cube_as_dict)
Alternative constructor
Parameters cube_as_dict – user as dict
Returns user, an instance of this class
classmethod from_json(cube_as_json)
Alternative constructor
Parameters cube_as_json – user as JSON string
Returns cube, an instance of this class
has_rules
name
rules
skipcheck
undefvals

2.2. TM1py.Objects package 7


TM1py Documentation, Release 1.0.2

2.2.10 TM1py.Objects.Dimension module

class TM1py.Objects.Dimension.Dimension(name, hierarchies=None)


Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of TM1 Dimension
A Dimension is a container for hierarchies.
add_hierarchy(hierarchy)
body
body_as_dict
contains_hierarchy(hierarchy_name)
default_hierarchy
classmethod from_dict(dimension_as_dict)
classmethod from_json(dimension_as_json)
get_hierarchy(hierarchy_name)
hierarchies
hierarchy_names
name
remove_hierarchy(hierarchy_name)
unique_name

2.2.11 TM1py.Objects.Element module

class TM1py.Objects.Element.Element(name, element_type, attributes=None,


unique_name=None, index=None)
Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of TM1 Element
body
body_as_dict
element_attributes
element_type
static from_dict(element_as_dict)
index
name
unique_name
valid_types = ('Numeric', 'String', 'Consolidated')

8 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

2.2.12 TM1py.Objects.ElementAttribute module

class TM1py.Objects.ElementAttribute.ElementAttribute(name, attribute_type)


Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of TM1 Element Attributes
attribute_type
body
body_as_dict
classmethod from_dict(element_attribute_as_dict)
classmethod from_json(element_attribute_as_json)
name
valid_types = ['NUMERIC', 'STRING', 'ALIAS']

2.2.13 TM1py.Objects.Hierarchy module

class TM1py.Objects.Hierarchy.Hierarchy(name, dimension_name, elements=None,


element_attributes=None, edges=None,
subsets=None, structure=None, de-
fault_member=None)
Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of TM1 Hierarchy Requires reference to a Dimension
Elements modeled as a Dictionary where key is the element name and value an instance of TM1py.Element {
‘US’: instance of TM1py.Element, ‘CN’: instance of TM1py.Element, ‘AU’: instance of
TM1py.Element
}
ElementAttributes of type TM1py.Objects.ElementAttribute
Edges are represented as a TM1py.Utils.CaseAndSpaceInsensitiveTupleDict: {
(parent1, component1) : 10, (parent1, component2) : 30
}
Subsets is list of type TM1py.Subset
add_edge(parent, component, weight)
add_element(element_name, element_type)
add_element_attribute(name, attribute_type)
balanced
body
body_as_dict
contains_element(element_name)
default_member
dimension_name
edges

2.2. TM1py.Objects package 9


TM1py Documentation, Release 1.0.2

element_attributes
elements
classmethod from_dict(hierarchy_as_dict)
get_element(element_name)
name
remove_edge(parent, component)
remove_edges(edges)
remove_edges_related_to_element(element_name)
remove_element(element_name)
remove_element_attribute(name)
subsets
update_edge(parent, component, weight)
update_element(element_name, element_type=None)

2.2.14 TM1py.Objects.MDXView module

class TM1py.Objects.MDXView.MDXView(cube_name, view_name, MDX)


Bases: TM1py.Objects.View.View
Abstraction on TM1 MDX view
IMPORTANT. MDXViews can’t be seen through the old TM1 clients (Archict, Perspectives). They do exist
though!
MDX
body
construct_body()
classmethod from_dict(view_as_dict, cube_name=None)
classmethod from_json(view_as_json, cube_name=None)

2.2.15 TM1py.Objects.NativeView module

class TM1py.Objects.NativeView.NativeView(cube_name, view_name, sup-


press_empty_columns=False, sup-
press_empty_rows=False, for-
mat_string=’0.#########’, titles=None,
columns=None, rows=None)
Bases: TM1py.Objects.View.View
Abstraction of TM1 NativeView (classic cube view)
Notes Complete, functional and tested
MDX
add_column(dimension_name, subset=None)
Add Dimension or Subset to the column-axis

10 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

Parameters
• dimension_name – name of the dimension
• subset – instance of TM1py.Subset. Can be None instead.
Returns
add_row(dimension_name, subset=None)
Add Dimension or Subset to the row-axis
Parameters
• dimension_name –
• subset – instance of TM1py.Subset. Can be None instead.
Returns
add_title(dimension_name, selection, subset=None)
Add subset and element to the titles-axis
Parameters
• dimension_name – name of the dimension.
• selection – name of an element.
• subset – instance of TM1py.Subset. Can be None instead.
Returns
as_MDX
Build a valid MDX Query from an Existing cubeview. Takes Zero suppression into account. Throws an
Exception when no elements are place on the columns. Subsets are referenced in the result-MDX through
the TM1SubsetToSet Function
Returns String, the MDX Query
body
columns
format_string
classmethod from_dict(view_as_dict, cube_name=None)
classmethod from_json(view_as_json, cube_name=None)
Alternative constructor :Parameters:
view_as_json : string, JSON

Returns View : an instance of this class

remove_column(dimension_name)
remove dimension from the column axis
Parameters dimension_name –
Returns
remove_row(dimension_name)
remove dimension from the row axis
Parameters dimension_name –
Returns

2.2. TM1py.Objects package 11


TM1py Documentation, Release 1.0.2

remove_title(dimension_name)
remove dimension from the titles-axis
Parameters dimension_name – name of the dimension.
Returns
rows
suppress_empty_cells
suppress_empty_columns
suppress_empty_rows

2.2.16 TM1py.Objects.Process module

class TM1py.Objects.Process.Process(name, has_security_access=False,


ui_data=’CubeAction=1511xe2x82xacDataAction=1503xe2x82xacCubeLogChan
parameters=None, variables=None, vari-
ables_ui_data=None, prolog_procedure=”, meta-
data_procedure=”, data_procedure=”, epi-
log_procedure=”, datasource_type=’None’,
datasource_ascii_decimal_separator=’.’,
datasource_ascii_delimiter_char=’;’, data-
source_ascii_delimiter_type=’Character’,
datasource_ascii_header_records=1, data-
source_ascii_quote_character=”, data-
source_ascii_thousand_separator=’, ’, data-
source_data_source_name_for_client=”, data-
source_data_source_name_for_server=”, data-
source_password=”, datasource_user_name=”, data-
source_query=”, datasource_uses_unicode=True,
datasource_view=”, datasource_subset=”)
Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of a TM1 Process.
IMPORTANT. doesn’t work with Processes that were generated through the Wizard
static add_generated_string_to_code(code)
add_parameter(name, prompt, value, parameter_type=None)
Parameters
• name –
• prompt –
• value –
• parameter_type – introduced in TM1 11 REST API, therefor optional. if Not given
type is derived from value
Returns
add_variable(name, type)
add variable to the process
Parameters
• name –

12 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2


• type – ‘String’ or ‘Numeric’
Returns
auto_generated_string = '#****Begin: Generated Statements***\r\n#****End: Generated S
begin_generated_statements = '#****Begin: Generated Statements***'
body
data_procedure
datasource_ascii_decimal_separator
datasource_ascii_delimiter_char
datasource_ascii_delimiter_type
datasource_ascii_header_records
datasource_ascii_quote_character
datasource_ascii_thousand_separator
datasource_data_source_name_for_client
datasource_data_source_name_for_server
datasource_password
datasource_query
datasource_subset
datasource_type
datasource_user_name
datasource_uses_unicode
datasource_view
drop_parameter_types()
end_generated_statements = '#****End: Generated Statements****'
epilog_procedure
classmethod from_dict(process_as_dict)
Parameters process_as_dict – Dictionary, process as dictionary
Returns an instance of this class
classmethod from_json(process_as_json)
Parameters process_as_json – response of /api/v1/Processes(‘x’)?$expand=*
Returns an instance of this class
has_security_access
metadata_procedure
name
parameters
prolog_procedure

2.2. TM1py.Objects package 13


TM1py Documentation, Release 1.0.2

remove_parameter(name)
remove_variable(name)
variables

2.2.17 TM1py.Objects.Rules module

class TM1py.Objects.Rules.Rules(rules)
Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of Rules on a cube.
rules_analytics A collection of rulestatements, where each statement is stored in uppercase without linebreaks.
comments are not included.
feeder_statements
feedstrings
has_feeders
init_analytics()
keywords = ['SKIPCHECK', 'FEEDSTRINGS', 'UNDEFVALS', 'FEEDERS']
rule_statements
rules_analytics
skipcheck
text
undefvals

2.2.18 TM1py.Objects.Server module

class TM1py.Objects.Server.Server(server_as_dict)
Abstraction of the TM1 Server
Notes contains the information you get from http://localhost:5895/api/v1/Servers no methods so far

2.2.19 TM1py.Objects.Subset module

class TM1py.Objects.Subset.AnonymousSubset(dimension_name, hierarchy_name=None, ex-


pression=None, elements=None)
Bases: TM1py.Objects.Subset.Subset
Abstraction of unregistered Subsets used in NativeViews (Check TM1py.ViewAxisSelection)
classmethod from_dict(subset_as_dict)
Alternative constructor
Parameters subset_as_dict – dictionary, representation of Subset as specified in CSDL
Returns an instance of this class
classmethod from_json(subset_as_json)
Alternative constructor :Parameters:
subset_as_json [string, JSON] representation of Subset as specified in CSDL

14 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

Returns Subset : an instance of this class

class TM1py.Objects.Subset.Subset(subset_name, dimension_name, hierarchy_name=None,


alias=None, expression=None, elements=None)
Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of the TM1 Subset (dynamic and static)
Done and tested. unittests available.
add_elements(elements)
add Elements to static subsets :Parameters:
elements : list of element names
alias
body
same logic here as in TM1 : when subset has expression its dynamic, otherwise static
body_as_dict
same logic here as in TM1 : when subset has expression its dynamic, otherwise static
dimension_name
elements
expression
classmethod from_dict(subset_as_dict)
classmethod from_json(subset_as_json)
Alternative constructor :Parameters:
subset_as_json [string, JSON] representation of Subset as specified in CSDL

Returns Subset : an instance of this class

hierarchy_name
is_dynamic
is_static
name
type

2.2.20 TM1py.Objects.TM1Object module

class TM1py.Objects.TM1Object.TM1Object
Parent Class for all TM1 Objects e.g. Cube, Process, Dimension.
body

2.2.21 TM1py.Objects.User module

class TM1py.Objects.User.User(name, groups, friendly_name=None, password=None)


Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of a TM1 User

2.2. TM1py.Objects package 15


TM1py Documentation, Release 1.0.2

add_group(group_name)
body
construct_body()
construct body (json) from the class attributes :return: String, TM1 JSON representation of a user
friendly_name
classmethod from_dict(user_as_dict)
Alternative constructor
Parameters user_as_dict – user as dict
Returns user, an instance of this class
classmethod from_json(user_as_json)
Alternative constructor
Parameters user_as_json – user as JSON string
Returns user, an instance of this class
groups
is_admin
name
password
remove_group(group_name)

2.2.22 TM1py.Objects.View module

class TM1py.Objects.View.View(cube, name)


Bases: TM1py.Objects.TM1Object.TM1Object
Abstraction of TM1 View serves as a parentclass for TM1py.Objects.MDXView and
TM1py.Objects.NativeView
cube
name

2.2.23 Module contents

2.3 TM1py.Services package

2.3.1 Submodules

2.3.2 TM1py.Services.AnnotationService module

class TM1py.Services.AnnotationService.AnnotationService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to handle Object Updates for TM1 CellAnnotations
create(annotation)
create an Annotation

16 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

Parameters annotation – instance of TM1py.Annotation


:return response
delete(annotation_id)
delete Annotation on TM1 Server
Parameters annotation_id – string, the id of the annotation
Returns string: the response
get(annotation_id)
get an annotation from any cube in TM1 Server through its id
Parameters annotation_id – String, the id of the annotation
Returns Annotation: an instance of TM1py.Annoation
get_all(cube_name)
get all annotations from given cube as a List.
Parameters cube_name –
Returns list of instances of TM1py.Annotation
update(annotation)
update Annotation on TM1 Server
Parameters annotation – instance of TM1py.Annotation
Notes
updateable attributes: commentValue

2.3.3 TM1py.Services.ApplicationService module

class TM1py.Services.ApplicationService.ApplicationService(tm1_rest)
Service to Read and Write TM1 Applications
get(path)
Get Excel Application from TM1 Server in binary format. Can be dumped to file.
Parameters path – path through folder structur to application. For instance: “Fi-
nance/P&L.xlsx”
Returns
Return application as binary. Can be dumped to file: with open(“out.xlsx”, “wb”) as out:
out.write(content)

2.3.4 TM1py.Services.CellService module

class TM1py.Services.CellService.CellService(tm1_rest)
Service to handle Read and Write operations to TM1 cubes
activate_transactionlog(*args)
Activate Transactionlog for one or many cubes
Parameters args – one or many cube names
Returns

2.3. TM1py.Services package 17


TM1py Documentation, Release 1.0.2

create_cellset(mdx)
Execute MDX in order to create cellset at server. return the cellset-id
Parameters mdx – MDX Query, as string
Returns
create_cellset_from_view(cube_name, view_name, private)
deactivate_transactionlog(*args)
Deacctivate Transactionlog for one or many cubes
Parameters args – one or many cube names
Returns
delete_cellset(cellset_id)
Delete a cellset
Parameters cellset_id –
Returns
execute_mdx(mdx, cell_properties=None, top=None, skip_contexts=False)
Execute MDX and return the cells with their properties
Parameters
• mdx – MDX Query, as string
• cell_properties – properties to be queried from the cell. E.g. Value, Ordinal,
RuleDerived, . . .
• top – integer
• skip_contexts – skip elements from titles / contexts in response
Returns content in sweet concise structure.
execute_mdx_cellcount(mdx)
Execute MDX in order to understand how many cells are in a cellset. Only return number of cells in the
cellset. FAST!
Parameters mdx – MDX Query, as string
Returns Number of Cells in the CellSet
execute_mdx_csv(mdx)
Optimized for performance. Get csv string of coordinates and values. Context dimensions are omitted !
Cells with Zero/null are omitted !
Parameters mdx – Valid MDX Query
Returns String
execute_mdx_dataframe(mdx)
Optimized for performance. Get Pandas DataFrame from MDX Query. Context dimensions are omitted in
the resulting Dataframe ! Cells with Zero/null are omitted !
Parameters mdx – Valid MDX Query
Returns Pandas Dataframe
execute_mdx_dataframe_pivot(mdx, dropna=False, fill_value=None)
Execute MDX Query to get a pandas pivot dataframe in the shape as specified in the Query
Parameters

18 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

• mdx –
• dropna –
• fill_value –
Returns
execute_mdx_raw(mdx, cell_properties=None, elem_properties=None, member_properties=None,
top=None, skip_contexts=False)
Execute MDX and return the raw data from TM1
Parameters
• mdx – String, a valid MDX Query
• cell_properties – List of properties to be queried from the cell. E.g. [‘Value’,
‘Ordinal’, ‘RuleDerived’, . . . ]
• elem_properties – List of properties to be queried from the elements. E.g. [‘Unique-
Name’,’Attributes’, . . . ]
• member_properties – List of properties to be queried from the members. E.g.
[‘UniqueName’,’Attributes’, . . . ]
• top – Integer limiting the number of cells and the number or rows returned
• skip_contexts – skip elements from titles / contexts in response
Returns Raw format from TM1.
execute_mdx_rows_and_values(mdx, element_unique_names=True)
execute_mdx_ui_array(mdx, elem_properties=None, member_properties=None,
value_precision=2, top=None)
Useful for grids or charting libraries that want an array of cell values per row. Returns 3-dimensional cell
structure for tabbed grids or multiple charts. Rows and pages are dicts, addressable by their name. Proper
order of rows can be obtained in headers[1] Example ‘cells’ return format:
‘cells’: {
‘10100’: {
‘Net Operating Income’: [ 19832724.72429739, 20365654.788303416,
20729201.329183243, 20480205.20121749],
‘Revenue’: [ 28981046.50724231, 29512482.207418434, 29913730.038971487,
29563345.9542385]},
‘10200’: {
‘Net Operating Income’: [ 9853293.623709997, 10277650.763958748,
10466934.096533755, 10333095.839474997],
‘Revenue’: [ 13888143.710000003, 14300216.43, 14502421.63,
14321501.940000001]}
},

Parameters
• top –
• mdx – a valid MDX Query
• elem_properties – List of properties to be queried from the elements. E.g. [‘Unique-
Name’,’Attributes’, . . . ]

2.3. TM1py.Services package 19


TM1py Documentation, Release 1.0.2

• member_properties – List of properties to be queried from the members. E.g.


[‘UniqueName’,’Attributes’, . . . ]
• value_precision – Integer (optional) specifying number of decimal places to return
Returns dict : { titles: [], headers: [axis][], cells: { Page0: { Row0: { [row values], Row1: [],
. . . }, . . . }, . . . } }

execute_mdx_ui_dygraph(mdx, elem_properties=None, member_properties=None,


value_precision=2, top=None)
Execute MDX get dygraph dictionary Useful for grids or charting libraries that want an array of cell values
per column Returns 3-dimensional cell structure for tabbed grids or multiple charts Example ‘cells’ return
format:
‘cells’: {
‘10100’: [ [‘Q1-2004’, 28981046.50724231, 19832724.72429739], [‘Q2-2004’,
29512482.207418434, 20365654.788303416], [‘Q3-2004’, 29913730.038971487,
20729201.329183243], [‘Q4-2004’, 29563345.9542385, 20480205.20121749]],
‘10200’: [ [‘Q1-2004’, 13888143.710000003, 9853293.623709997], [‘Q2-2004’,
14300216.43, 10277650.763958748], [‘Q3-2004’, 14502421.63, 10466934.096533755],
[‘Q4-2004’, 14321501.940000001, 10333095.839474997]]
},

Parameters
• top –
• mdx – String, valid MDX Query
• elem_properties – List of properties to be queried from the elements. E.g. [‘Unique-
Name’,’Attributes’, . . . ]
• member_properties – List of properties to be queried from the members. E.g.
[‘UniqueName’,’Attributes’, . . . ]
• value_precision – Integer (optional) specifying number of decimal places to return
Returns dict : { titles: [], headers: [axis][], cells: { Page0: [ [column name, column values], [],
. . . ], . . . } }

execute_mdx_values(mdx)
Optimized for performance. Query only raw cell values. Coordinates are omitted !
Parameters mdx – a valid MDX Query
Returns Generator of cell values
execute_view(cube_name, view_name, cell_properties=None, private=True, top=None,
skip_contexts=False)
get view content as dictionary with sweet and concise structure. Works on NativeView and
MDXView !

Parameters
• cube_name – String
• view_name – String
• cell_properties – List, cell properties: [Values, Status, HasPicklist, etc.]

20 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

• private – Boolean
• top – Int, number of cells to return (counting from top)
• skip_contexts – skip elements from titles / contexts in response
Returns Dictionary : {([dim1].[elem1], [dim2][elem6]): {‘Value’:3127.312, ‘Ordinal’:12} . . . .
}

execute_view_cellcount(cube_name, view_name, private=True)


Execute cube view in order to understand how many cells are in a cellset. Only return number of cells in
the cellset. FAST!
Parameters
• cube_name – cube name
• view_name – view name
• private – True (private) or False (public)
Returns
execute_view_csv(cube_name, view_name, private=True)
execute_view_dataframe(cube_name, view_name, private=True)
Optimized for performance. Get Pandas DataFrame from an existing Cube View Context dimensions are
omitted in the resulting Dataframe ! Cells with Zero/null are omitted !
Parameters
• cube_name – Name of the
• view_name –
• private –
Returns
execute_view_dataframe_pivot(cube_name, view_name, private=False, dropna=False,
fill_value=None)
Execute a cube view to get a pandas pivot dataframe, in the shape of the cube view
Parameters
• cube_name –
• view_name –
• private –
• dropna –
• fill_value –
Returns
execute_view_raw(cube_name, view_name, private=True, cell_properties=None,
elem_properties=None, member_properties=None, top=None,
skip_contexts=False)
Execute a cube view and return the raw data from TM1
Parameters
• cube_name – String, name of the cube
• view_name – String, name of the view

2.3. TM1py.Services package 21


TM1py Documentation, Release 1.0.2

• private – True (private) or False (public)


• cell_properties – List of properties to be queried from the cell. E.g. [‘Value’,
‘Ordinal’, ‘RuleDerived’, . . . ]
• elem_properties – List of properties to be queried from the elements. E.g. [‘Unique-
Name’,’Attributes’, . . . ]
• member_properties – List of properties to be queried from the members. E.g.
[‘UniqueName’,’Attributes’, . . . ]
• top – Integer limiting the number of cells and the number or rows returned
• skip_contexts – skip elements from titles / contexts in response
Returns Raw format from TM1.
execute_view_rows_and_values(cube_name, view_name, private=True, ele-
ment_unique_names=True)
execute_view_ui_array(cube_name, view_name, private=True, elem_properties=None, mem-
ber_properties=None, value_precision=2, top=None)
Useful for grids or charting libraries that want an array of cell values per row. Returns 3-dimensional cell
structure for tabbed grids or multiple charts. Rows and pages are dicts, addressable by their name. Proper
order of rows can be obtained in headers[1] Example ‘cells’ return format:
‘cells’: {
‘10100’: {
‘Net Operating Income’: [ 19832724.72429739, 20365654.788303416,
20729201.329183243, 20480205.20121749],
‘Revenue’: [ 28981046.50724231, 29512482.207418434, 29913730.038971487,
29563345.9542385]},
‘10200’: {
‘Net Operating Income’: [ 9853293.623709997, 10277650.763958748,
10466934.096533755, 10333095.839474997],
‘Revenue’: [ 13888143.710000003, 14300216.43, 14502421.63,
14321501.940000001]}
},

Parameters
• top –
• cube_name – cube name
• view_name – view name
• private – True (private) or False (public)
• elem_properties – List of properties to be queried from the elements. E.g. [‘Unique-
Name’,’Attributes’, . . . ]
• member_properties – List properties to be queried from the member. E.g. [‘Name’,
‘UniqueName’]
• value_precision – Integer (optional) specifying number of decimal places to return
Returns dict : { titles: [], headers: [axis][], cells: { Page0: { Row0: { [row values], Row1: [],
. . . }, . . . }, . . . } }

22 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

execute_view_ui_dygraph(cube_name, view_name, private=True, elem_properties=None, mem-


ber_properties=None, value_precision=2, top=None)
Useful for grids or charting libraries that want an array of cell values per row. Returns 3-dimensional cell
structure for tabbed grids or multiple charts. Rows and pages are dicts, addressable by their name. Proper
order of rows can be obtained in headers[1] Example ‘cells’ return format:
‘cells’: {
‘10100’: {
‘Net Operating Income’: [ 19832724.72429739, 20365654.788303416,
20729201.329183243, 20480205.20121749],
‘Revenue’: [ 28981046.50724231, 29512482.207418434, 29913730.038971487,
29563345.9542385]},
‘10200’: {
‘Net Operating Income’: [ 9853293.623709997, 10277650.763958748,
10466934.096533755, 10333095.839474997],
‘Revenue’: [ 13888143.710000003, 14300216.43, 14502421.63,
14321501.940000001]}
},

Parameters
• top –
• cube_name – cube name
• view_name – view name
• private – True (private) or False (public)
• elem_properties – List of properties to be queried from the elements. E.g. [‘Unique-
Name’,’Attributes’, . . . ]
• member_properties – List of properties to be queried from the members. E.g.
[‘UniqueName’,’Attributes’, . . . ]
• value_precision – number decimals
Returns

execute_view_values(cube_name, view_name, private=True)


extract_cellset(cellset_id, cell_properties=None, top=None, delete_cellset=True,
skip_contexts=False)
Execute Cellset and return the cells with their properties
Parameters
• skip_contexts –
• delete_cellset –
• cellset_id –
• cell_properties – properties to be queried from the cell. E.g. Value, Ordinal,
RuleDerived, . . .
• top – integer
Returns Content in sweet consice strcuture.

2.3. TM1py.Services package 23


TM1py Documentation, Release 1.0.2

extract_cellset_cellcount(cellset_id, *args, **kwargs)


extract_cellset_composition(cellset_id, *args, **kwargs)
extract_cellset_csv(cellset_id, *args, **kwargs)
Execute Cellset and return only the ‘Content’, in csv format
Parameters cellset_id – String; ID of existing cellset
Returns Raw format from TM1.
extract_cellset_dataframe_pivot(cellset_id, dropna=False, fill_value=False, **kwargs)
Extract a pivot table (pandas dataframe) from a cellset in TM1
Parameters
• cellset_id –
• dropna –
• fill_value –
• kwargs –
Returns
extract_cellset_raw(cellset_id, *args, **kwargs)
Extract full Cellset data and return the raw data from TM1
Parameters
• skip_contexts –
• cellset_id – String; ID of existing cellset
• cell_properties – List of properties to be queried from cells. E.g. [‘Value’, ‘RuleD-
erived’, . . . ]
• elem_properties – List of properties to be queried from elements. E.g. [‘Unique-
Name’,’Attributes’, . . . ]
• member_properties – List properties to be queried from the member. E.g. [‘Name’,
‘UniqueName’]
• top – Integer limiting the number of cells and the number or rows returned
Returns Raw format from TM1.
extract_cellset_rows_and_values(cellset_id, *args, **kwargs)
extract_cellset_values(cellset_id, *args, **kwargs)
Extract Cellset data and return only the cells and values
Parameters cellset_id – String; ID of existing cellset
Returns Raw format from TM1.
get_cellset_cells_count(mdx)
Execute MDX in order to understand how many cells are in a cellset
Parameters mdx – MDX Query, as string
Returns Number of Cells in the CellSet
get_value(cube_name, element_string, dimensions=None)
Element_String describes the Dimension-Hierarchy-Element arrangement
Parameters

24 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

• cube_name – Name of the cube


• element_string – “Hierarchy1::Element1 && Hierarchy2::Element4, Element9, El-
ement2” - Dimensions are not specified! They are derived from the position. - The ,
seperates the element-selections - If more than one hierarchy is selected per dimension
&& splits the elementselections - If no Hierarchy is specified. Default Hierarchy will be
addressed
• dimensions – List of dimension names in correct order
Returns
get_view_content(cube_name, view_name, cell_properties=None, private=True, top=None)
relative_proportional_spread(value, cube, unique_element_names, refer-
ence_unique_element_names, reference_cube=None)
Execute relative proportional spread
Parameters
• value – value to be spread
• cube – name of the cube
• unique_element_names – target cell coordinates as unique element names (e.g.
[“[d1].[c1]”,”[d2].[e3]”])
• reference_cube – name of the reference cube. Can be None
• reference_unique_element_names – reference cell coordinates as unique ele-
ment names
Returns
update_cellset(cellset_id, *args, **kwargs)
Write values into cellset
Number of values must match the number of cells in the cellset
Parameters
• cellset_id –
• values – iterable with Numeric and String values
Returns
write_value(value, cube_name, element_tuple, dimensions=None)
Write value into cube at specified coordinates
Parameters
• value – the actual value
• cube_name – name of the target cube
• element_tuple – target coordinates
• dimensions – optional. Dimension names in their natural order. Will speed up the
execution!
Returns response
write_values(cube_name, cellset_as_dict, dimensions=None)
Write values in cube. For cellsets with > 1000 cells look into “write_values_through_cellset”
Parameters

2.3. TM1py.Services package 25


TM1py Documentation, Release 1.0.2

• cube_name – name of the cube


• cellset_as_dict – {(elem_a, elem_b, elem_c): 243, (elem_d, elem_e, elem_f) :
109}
• dimensions – optional. Dimension names in their natural order. Will speed up the
execution!
Returns Response
write_values_through_cellset(mdx, values)
Significantly faster than write_values function Cellset gets created according to MDX Expression. For
instance: [[61, 29 ,13], [42, 54, 15], [17, 28, 81]]
Each value in the cellset can be addressed through its position: The ordinal integer value. Ordinal-
enumeration goes from top to bottom from left to right Number 61 has Ordinal 0, 29 has Ordinal 1,
etc.
The order of the iterable determines the insertion point in the cellset. For instance: [91, 85, 72, 68, 51, 42,
35, 28, 11]
would lead to: [[91, 85 ,72], [68, 51, 42], [35, 28, 11]]
When writing large datasets into TM1 Cubes it can be convenient to call this function asynchronously.
Parameters
• mdx – Valid MDX Expression.
• values – List of values. The Order of the List/ Iterable determines the insertion point in
the cellset.
Returns
TM1py.Services.CellService.tidy_cellset(func)
Higher Order Function to tidy up cellset after usage

2.3.5 TM1py.Services.ChoreService module

class TM1py.Services.ChoreService.ChoreService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to handle Object Updates for TM1 Chores
activate(chore_name)
activate chore on TM1 Server
Parameters chore_name –
Returns response
create(chore)
create chore in TM1
Parameters chore – instance of TM1py.Chore
Returns
deactivate(chore_name)
deactivate chore on TM1 Server
Parameters chore_name –
Returns response

26 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

delete(chore_name)
delete chore in TM1
Parameters chore_name –
Returns response
execute_chore(chore_name)
Ask TM1 Server to execute a chore
Parameters chore_name – String, name of the chore to be executed
Returns the response
exists(chore_name)
Check if Chore exists
Parameters chore_name –
Returns
get(chore_name)
Get a chore from the TM1 Server
Parameters chore_name –
Returns instance of TM1py.Chore
get_all()
get a List of all Chores
Returns List of TM1py.Chore
get_all_names()
get a List of all Chores
Returns List of TM1py.Chore
set_local_start_time(chore_name, date_time)
Makes Server crash if chore is activate (10.2.2 FP6) :)
Parameters
• chore_name –
• date_time –
Returns
update(chore)
update chore on TM1 Server
does not update: DST Sensitivity! :param chore: :return: response
TM1py.Services.ChoreService.deactivate_activate(func)
Higher Order function to handle activation and deactivation of chores before updating them
Parameters func –
Returns

2.3.6 TM1py.Services.CubeService module

class TM1py.Services.CubeService.CubeService(rest)
Bases: TM1py.Services.ObjectService.ObjectService

2.3. TM1py.Services package 27


TM1py Documentation, Release 1.0.2

Service to handle Object Updates for TM1 Cubes


create(cube)
create new cube on TM1 Server
Parameters cube – instance of TM1py.Cube
Returns response
delete(cube_name)
Delete a cube in TM1
Parameters cube_name –
Returns response
exists(cube_name)
Check if a cube exists. Return boolean.
Parameters cube_name –
Returns Boolean
get(cube_name)
get cube from TM1 Server
Parameters cube_name –
Returns instance of TM1py.Cube
get_all()
get all cubes from TM1 Server as TM1py.Cube instances
Returns List of TM1py.Cube instances
get_all_names()
Ask TM1 Server for list of all cube names
Returns List of Strings
get_control_cubes()
Get all Cubes with } prefix from TM1 Server as TM1py.Cube instances
Returns List of TM1py.Cube instances
get_dimension_names(cube_name)
get name of the dimensions of a cube in their correct order
Parameters cube_name – String
Returns List : [dim1, dim2, dim3, etc.]
get_model_cubes()
Get all Cubes without } prefix from TM1 Server as TM1py.Cube instances
Returns List of TM1py.Cube instances
get_random_intersection(cube_name, unique_names=False)
Get a random Intersection in a cube used mostly for regressiontesting. Not optimized, in terms of perfor-
mance. Function Loads ALL elements for EACH dim. . .
Parameters
• cube_name –
• unique_names – unique names instead of plain element names
Returns List of elements

28 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

get_storage_dimension_order(cube_name)
Get the storage dimension order of a cube
Parameters cube_name –
Returns List of dimension names
update(cube)
Update existing cube on TM1 Server
Parameters cube – instance of TM1py.Cube
Returns response
update_storage_dimension_order(cube_name, dimension_names)
Update the storage dimension order of a cube
Parameters
• cube_name –
• dimension_names –
Returns

2.3.7 TM1py.Services.DimensionService module

class TM1py.Services.DimensionService.DimensionService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to handle Object Updates for TM1 Dimensions
create(dimension)
Create a dimension
Parameters dimension – instance of TM1py.Dimension
Returns response
create_element_attributes_through_ti(dimension)
:param dimension. Instance of TM1py.Objects.Dimension class :return:
delete(dimension_name)
Delete a dimension
Parameters dimension_name – Name of the dimension
Returns
execute_mdx(dimension_name, mdx)
Execute MDX against Dimension. Requires }ElementAttributes_ Cube of the dimension to exist !
Parameters
• dimension_name – Name of the Dimension
• mdx – valid Dimension-MDX Statement
Returns List of Element names
exists(dimension_name)
Check if dimension exists
Returns

2.3. TM1py.Services package 29


TM1py Documentation, Release 1.0.2

get(dimension_name)
Get a Dimension
Parameters dimension_name –
Returns
get_all_names()
Ask TM1 Server for list with all dimension names
Returns List of Strings
update(dimension)
Update an existing dimension
Parameters dimension – instance of TM1py.Dimension
Returns None

2.3.8 TM1py.Services.ElementService module

class TM1py.Services.ElementService.ElementService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to handle Object Updates for TM1 Dimension (resp. Hierarchy) Elements
create(dimension_name, hierarchy_name, element)
create_element_attribute(dimension_name, hierarchy_name, element_attribute)
like AttrInsert
Parameters
• dimension_name –
• hierarchy_name –
• element_attribute – instance of TM1py.ElementAttribute
Returns
delete(dimension_name, hierarchy_name, element_name)
delete_element_attribute(dimension_name, hierarchy_name, element_attribute)
like AttrDelete
Parameters
• dimension_name –
• hierarchy_name –
• element_attribute – instance of TM1py.ElementAttribute
Returns
exists(dimension_name, hierarchy_name, element_name)
get(dimension_name, hierarchy_name, element_name)
get_element_attributes(dimension_name, hierarchy_name)
Get element attributes from hierarchy
Parameters
• dimension_name –

30 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

• hierarchy_name –
Returns
get_element_names(dimension_name, hierarchy_name)
Get all elementnames
Parameters
• dimension_name –
• hierarchy_name –
Returns Generator of element-names
get_elements(dimension_name, hierarchy_name)
get_elements_filtered_by_attribute(dimension_name, hierarchy_name, attribute_name,
attribute_value)
Get all elements from a hierarchy with given attribute value
Parameters
• dimension_name –
• hierarchy_name –
• attribute_name –
• attribute_value –
Returns List of element names
get_leaf_element_names(dimension_name, hierarchy_name)
get_leaf_elements(dimension_name, hierarchy_name)
get_leaves_under_consolidation(dimension_name, hierarchy_name, consolidation,
max_depth=None)
Get all leaves under a consolidated element
Parameters
• dimension_name – name of dimension
• hierarchy_name – name of hierarchy
• consolidation – name of consolidated Element
• max_depth – 99 if not passed
Returns
get_members_under_consolidation(dimension_name, hierarchy_name, consolidation,
max_depth=None, leaves_only=False)
Get all members under a consolidated element
Parameters
• dimension_name – name of dimension
• hierarchy_name – name of hierarchy
• consolidation – name of consolidated Element
• max_depth – 99 if not passed
• leaves_only – Only Leaf Elements or all Elements
Returns

2.3. TM1py.Services package 31


TM1py Documentation, Release 1.0.2

update(dimension_name, hierarchy_name, element)

2.3.9 TM1py.Services.HierarchyService module

class TM1py.Services.HierarchyService.HierarchyService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to handle Object Updates for TM1 Hierarchies
EDGES_WORKAROUND_VERSIONS = ('11.0.002', '11.0.003', '11.1.000')
create(hierarchy)
Create a hierarchy in an existing dimension
Parameters hierarchy –
Returns
delete(dimension_name, hierarchy_name)
exists(dimension_name, hierarchy_name)
Parameters
• dimension_name –
• hierarchy_name –
Returns
get(dimension_name, hierarchy_name)
get hierarchy
Parameters
• dimension_name – name of the dimension
• hierarchy_name – name of the hierarchy
Returns
get_all_names(dimension_name)
get all names of existing Hierarchies in a dimension
Parameters dimension_name –
Returns
get_default_member(dimension_name, hierarchy_name=None)
Get the defined default_member for a Hierarchy. Will return the element with index 1, if default member
is not specified explicitly in }HierarchyProperty Cube
Parameters
• dimension_name –
• hierarchy_name –
Returns String, name of Member
get_hierarchy_summary(dimension_name, hierarchy_name)
update(hierarchy)
update a hierarchy. It’s a two step process: 1. Update Hierarchy 2. Update Element-Attributes
Function caters for Bug with Edge Creation: https://www.ibm.com/developerworks/community/forums/
html/topic?id=75f2b99e-6961-4c71-9364-1d5e1e083eff

32 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

Parameters hierarchy – instance of TM1py.Hierarchy


Returns list of responses
update_default_member(dimension_name, hierarchy_name=None, member_name=”)
Update the default member of a hierarchy. Currently implemented through TI, since TM1 API does not
supports default member updates yet.
Parameters
• dimension_name –
• hierarchy_name –
• member_name –
Returns

2.3.10 TM1py.Services.MonitoringService module

class TM1py.Services.MonitoringService.MonitoringService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to Query and Cancel Threads in TM1
cancel_thread(thread_id)
Kill a running thread
Parameters thread_id –
Returns
disconnect_user(user_name)
Disconnect User
Parameters user_name –
Returns
get_active_users()
Get the activate users in TM1
Returns List of TM1py.User instances
get_threads()
Return a dict of the currently running threads from the TM1 Server
Returns dict: the response
user_is_active(user_name)
Check if user is currently active in TM1
Parameters user_name –
Returns Boolean

2.3.11 TM1py.Services.ObjectService module

class TM1py.Services.ObjectService.ObjectService(rest_service)
Parentclass for all Object Services
determine_actual_object_name(object_class, object_name)
version

2.3. TM1py.Services package 33


TM1py Documentation, Release 1.0.2

2.3.12 TM1py.Services.ProcessService module

class TM1py.Services.ProcessService.ProcessService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to handle Object Updates for TI Processes
compile(name)
Compile a Process. Return List of Syntax errors.
Parameters name –
Returns
create(process)
Create a new process on TM1 Server
Parameters process – Instance of TM1py.Process class
Returns Response
delete(name)
Delete a process in TM1
Parameters name –
Returns Response
execute(process_name, parameters=None, **kwargs)
Ask TM1 Server to execute a process. Call with parameter names as keyword arguments:
tm1.processes.execute(“Bedrock.Server.Wait”, pLegalEntity=”UK01”)
Parameters
• process_name –
• parameters – Deprecated! dictionary, e.g. {“Parameters”: [ { “Name”: “pLegalEn-
tity”, “Value”: “UK01” }] }
Returns
execute_ti_code(lines_prolog, lines_epilog=None)
Execute lines of code on the TM1 Server
Parameters
• lines_prolog – list - where each element is a valid statement of TI code.
• lines_epilog – list - where each element is a valid statement of TI code.
execute_with_return(process_name, **kwargs)
Ask TM1 Server to execute a process. pass process parameters as keyword arguments to this function.
E.g:
self.tm1.processes.execute_with_return( process_name=”Bedrock.Server.Wait”, pWaitSec=2)

Parameters
• process_name – name of the TI process
• kwargs – names of process parameters
Returns success (boolean), status (String), error_log_file (String)

exists(name)
Check if Process exists.

34 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

Parameters name –
Returns
get(name_process)
Get a process from TM1 Server
Parameters name_process –
Returns Instance of the TM1py.Process
get_all()
Get a processes from TM1 Server
Returns List, instances of the TM1py.Process
get_all_names()
Get List with all process names from TM1 Server
Returns List of Strings
get_all_process_names_filtered()
Get List with all process names from TM1 Server.
Does not return:
• system process
• Processes that have Subset as Datasource

Returns List of Strings

get_error_log_file_content(file_name)
Get content of error log file (e.g. TM1ProcessError_20180926213819_65708356_979b248b-
232e622c6.log)
Parameters file_name – name of the error log file in the TM1 log directory
Returns String, content of the file
get_last_message_from_processerrorlog(process_name)
Get the latest ProcessErrorLog from a process entity
Parameters process_name – name of the process
Returns String - the errorlog, e.g.: “Fehler: Prolog Prozedurzeile (9): Zeichenfolge “US772131
kann nicht in eine reelle Zahl umgewandelt werden.”
get_processerrorlogs(process_name)
Get all ProcessErrorLog entries for a process
Parameters process_name – name of the process
Returns list - Collection of ProcessErrorLogs
update(process)
Update an existing Process on TM1 Server
Parameters process – Instance of TM1py.Process class
Returns Response

2.3. TM1py.Services package 35


TM1py Documentation, Release 1.0.2

2.3.13 TM1py.Services.RESTService module

class TM1py.Services.RESTService.RESTService(**kwargs)
Low level communication with TM1 instance through HTTP. Allows to execute HTTP Methods
• GET
• POST
• PATCH
• DELETE

Takes Care of
• Encodings
• TM1 User-Login
• HTTP Headers
• HTTP Session Management
• Response Handling

Based on requests module


DELETE(request, data=”)
Delete request against TM1 instance
Parameters
• request – String, for instance : /api/v1/Dimensions(‘plan_business_unit’)
• data – String, empty
Returns String, the response in text
GET(request, data=”)
Perform a GET request against TM1 instance
Parameters
• request – String, for instance : /api/v1/Cubes?$top=1
• data – String, empty
Returns String, the response as text
HEADERS = {'Accept': 'application/json;odata.metadata=none,text/plain', 'Connection':
PATCH(request, data=”)
PATCH request against the TM1 instance
Parameters
• request – String, for instance : /api/v1/Dimensions(‘plan_business_unit’)
• data – String, the payload (json)
Returns String, the response as text
POST(request, data=”)
POST request against the TM1 instance
Parameters
• request – String, /api/v1/Cubes

36 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

• data – String, the payload (json)


Returns String, the response as text
add_http_header(key, value)
static b64_decode_password(encrypted_password)
b64 decoding
Parameters encrypted_password – encrypted password with b64
Returns password in plain text
static disable_http_warnings()
get_http_header(key)
is_connected()
Check if Connection to TM1 Server is established.
Returns Boolean
logout()
End TM1 Session and HTTP session
remove_http_header(key)
session_id
set_version()
static translate_to_boolean(value)
Takes a boolean or string (eg. true, True, FALSE, etc.) value and returns (boolean) True or False
Parameters value – True, ‘true’, ‘false’ or ‘False’ . . .
Returns
static verify_response(response)
check if Status Code is OK
Parameters
response: String the response that is returned from a method call
Exceptions TM1pyException, raises TM1pyException when Code is not 200, 204 etc.
version
TM1py.Services.RESTService.httpmethod(func)
Higher Order Function to wrap the GET, POST, PATCH, PUT, DELETE methods
Takes care of: - encoding of url and payload - verifying response. Throws TM1pyException if StatusCode of
Response is not OK

2.3.14 TM1py.Services.SecurityService module

class TM1py.Services.SecurityService.SecurityService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to handle Security stuff
add_user_to_groups(user_name, groups)
Parameters
• user_name – name of user

2.3. TM1py.Services package 37


TM1py Documentation, Release 1.0.2

• groups – iterable of groups


Returns response
create_group(group_name)
Create a Security group in the TM1 Server
Parameters group_name –
Returns
create_user(user)
Create a user on TM1 Server
Parameters user – instance of TM1py.User
Returns response
delete_group(group_name)
Delete a group in the TM1 Server
Parameters group_name –
Returns
delete_user(user_name)
Delete user on TM1 Server
Parameters user_name –
Returns response
determine_actual_group_name(group_name)
determine_actual_user_name(user_name)
get_all_groups()
Get all groups from TM1 Server
Returns List of strings
get_all_user_names()
Get all user names from TM1 Server
Returns List of TM1py.User instances
get_all_users()
Get all users from TM1 Server
Returns List of TM1py.User instances
get_current_user()
Get user and group assignments of this session
Returns instance of TM1py.User
get_groups(user_name)
Get the groups of a user in TM1 Server
Parameters user_name –
Returns List of strings
get_user(user_name)
Get user from TM1 Server
Parameters user_name –

38 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

Returns instance of TM1py.User


get_user_names_from_group(group_name)
Get all users from group
Parameters group_name –
Returns List of strings
get_users_from_group(group_name)
Get all users from group
Parameters group_name –
Returns List of TM1py.User instances
remove_user_from_group(group_name, user_name)
Remove user from group in TM1 Server
Parameters
• group_name –
• user_name –
Returns response
security_refresh()
update_user(user)
Update user on TM1 Server
Parameters user – instance of TM1py.User
Returns response

2.3.15 TM1py.Services.ServerService module

class TM1py.Services.ServerService.ServerService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to query common information from the TM1 Server
execute_message_log_delta_request(*args, **kwargs)
execute_transaction_log_delta_request(*args, **kwargs)
get_active_configuration()
Read current effective(!) TM1 config settings as dictionary from TM1 Server
Returns config as dictionary
get_admin_host()
get_configuration()
get_data_directory()
get_last_process_message_from_messagelog(process_name)
Get the latest messagelog entry for a process
Parameters process_name – name of the process
Returns String - the message, for instance: “Ausführung normal beendet, verstrichene Zeit 0.03
Sekunden”
get_message_log_entries(reverse=True, top=None)

2.3. TM1py.Services package 39


TM1py Documentation, Release 1.0.2

get_product_version()
Ask TM1 Server for its version
Returns String, the version
get_server_name()
Ask TM1 Server for its name
Returns String, the server name
get_static_configuration()
Read current applied (!) TM1 config settings as dictionary from TM1 Server
Returns config as dictionary
get_transaction_log_entries(reverse=True, user=None, cube=None, since=None,
top=None)
Parameters
• reverse –
• user –
• cube –
• since – of type datetime. If it doesn’t have tz information, UTC is assumed.
• top –
Returns
initialize_message_log_delta_requests(*args, **kwargs)
initialize_transaction_log_delta_requests(*args, **kwargs)
save_data()
update_static_configuration(configuration)
Update the .cfg file and triggers TM1 to re-read the file.
Parameters configuration –
Returns Response
TM1py.Services.ServerService.odata_track_changes_header(func)
Higher Order function to handle addition and removal of odata.track-changes HTTP Header
Parameters func –
Returns

2.3.16 TM1py.Services.SubsetService module

class TM1py.Services.SubsetService.SubsetService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to handle Object Updates for TM1 Subsets (dynamic and static)
create(subset, private=True)
create subset on the TM1 Server
Parameters
• subset – TM1py.Subset, the subset that shall be created
• private – boolean

40 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

Returns string: the response


delete(subset_name, dimension_name, hierarchy_name=None, private=True)
Delete an existing subset on the TM1 Server
Parameters
• subset_name – String, name of the subset
• dimension_name – String, name of the dimension
• hierarchy_name – String, name of the hierarchy
• private – Boolean
Returns
delete_elements_from_static_subset(dimension_name, hierarchy_name, subset_name,
private)
exists(subset_name, dimension_name, hierarchy_name=None, private=True)
checks if private or public subset exists
Parameters
• subset_name –
• dimension_name –
• hierarchy_name –
• private –
Returns boolean
get(subset_name, dimension_name, hierarchy_name=None, private=True)
get a subset from the TM1 Server
Parameters
• subset_name – string, name of the subset
• dimension_name – string, name of the dimension
• hierarchy_name – string, name of the hierarchy
• private – Boolean
Returns instance of TM1py.Subset
get_all_names(dimension_name, hierarchy_name=None, private=True)
get names of all private or public subsets in a hierarchy
Parameters
• dimension_name –
• hierarchy_name –
• private – Boolean
Returns List of Strings
update(subset, private=True)
update a subset on the TM1 Server
Parameters
• subset – instance of TM1py.Subset.

2.3. TM1py.Services package 41


TM1py Documentation, Release 1.0.2

• private – Boolean
Returns response

2.3.17 TM1py.Services.TM1Service module

class TM1py.Services.TM1Service.TM1Service(**kwargs)
All features of TM1py are exposed through this service
Can be saved and restored from File, to avoid multiple authentication with TM1.
connection
logout()
classmethod restore_from_file(file_name)
save_to_file(file_name)
version
whoami

2.3.18 TM1py.Services.ViewService module

class TM1py.Services.ViewService.ViewService(rest)
Bases: TM1py.Services.ObjectService.ObjectService
Service to handle Object Updates for cube views (NativeViews and MDXViews)
create(view, private=True)
create a new view on TM1 Server
Parameters
• view – instance of subclass of TM1py.View (TM1py.NativeView or TM1py.MDXView)
• private – boolean
Returns Response
delete(cube_name, view_name, private=True)
Delete an existing view (MDXView or NativeView) on the TM1 Server
Parameters
• cube_name – String, name of the cube
• view_name – String, name of the view
• private – Boolean
Returns String, the response
exists(cube_name, view_name, private=None)
Checks if view exists as private, public or both
Parameters
• cube_name – string, name of the cube
• view_name – string, name of the view
• private – boolean, if None: check for private and public

42 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

:return boolean tuple


get(cube_name, view_name, private=True)
get_all(cube_name)
Get all public and private views from cube.
Parameters cube_name – String, name of the cube.
Returns 2 Lists of TM1py.View instances: private views, public views
get_all_names(cube_name)
Parameters cube_name –
Returns
get_mdx_view(cube_name, view_name, private=True)
Get an MDXView from TM1 Server
Parameters
• cube_name – String, name of the cube
• view_name – String, name of the MDX view
• private – boolean
Returns instance of TM1py.MDXView
get_native_view(cube_name, view_name, private=True)
Get a NativeView from TM1 Server
Parameters
• cube_name – string, name of the cube
• view_name – string, name of the native view
• private – boolean
Returns instance of TM1py.NativeView
update(view, private=True)
Update an existing view
Parameters
• view – instance of TM1py.NativeView or TM1py.MDXView
• private – boolean
Returns response

2.3. TM1py.Services package 43


TM1py Documentation, Release 1.0.2

2.3.19 Module contents

2.4 TM1py.Utils package

2.4.1 Submodules

2.4.2 TM1py.Utils.MDXUtils module

class TM1py.Utils.MDXUtils.DimensionSelection(dimension_name, elements=None, sub-


set=None, expression=None)
Instances of this class to be passed to construct_mdx function
EXPRESSION = 2
ITERABLE = 3
SUBSET = 1
static determine_selection_type(elements=None, subset=None, expression=None)
TM1py.Utils.MDXUtils.construct_mdx(cube_name, rows, columns, contexts=None, sup-
press=None)
Method to construct MDX Query from different dimension selection
Parameters
• cube_name – Name of the Cube
• rows – List of DimensionSelections
• columns – List of DimensionSelections
• contexts – Dictionary of Dimensions and Elements
• suppress – “Both”, “Rows”, “Columns” or None
Returns Generated MDX Query
TM1py.Utils.MDXUtils.construct_mdx_axis(dim_selections)
Construct MDX for one Axis (Row or Column). Can have multiple dimensions stacked.
Parameters dim_selections – instances of TM1py.Utils.MDXUtils.DimensionSelection
Returns a valid MDX for an Axis
TM1py.Utils.MDXUtils.curly_braces(expression)
Put curly braces around a string
Parameters expression –
Returns
TM1py.Utils.MDXUtils.read_cube_name_from_mdx(mdx)
Read the cube name from a valid MDX Query
Parameters mdx – The MDX Query as String
Returns String, name of a cube
TM1py.Utils.MDXUtils.read_dimension_composition_from_mdx(mdx)
Parse a valid MDX Query and return the name of the cube and a list of dimensions for each axis
Parameters mdx –
Returns

44 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

TM1py.Utils.MDXUtils.read_dimension_composition_from_mdx_set(mdx)
TM1py.Utils.MDXUtils.read_dimension_composition_from_mdx_set_or_tuple(mdx)
TM1py.Utils.MDXUtils.read_dimension_composition_from_mdx_tuple(mdx)
TM1py.Utils.MDXUtils.split_mdx(mdx)

2.4.3 TM1py.Utils.TIObfuscator module

TM1py.Utils.TIObfuscator.generate_unique_string(code)
TM1py.Utils.TIObfuscator.get_all_defined_variables(code)
TM1py.Utils.TIObfuscator.obfuscate_code(code, variable_mapping, unique_string)
TM1py.Utils.TIObfuscator.obfuscate_process(process, new_name=None)
TM1py.Utils.TIObfuscator.remove_comment_lines(code)
TM1py.Utils.TIObfuscator.remove_generated_code(code)
Remove The generated code lines that are in between # *** comments
Parameters code –
Returns
TM1py.Utils.TIObfuscator.split_into_statements(code)
code from one Tab. Code String must come Without Comment-lines !
Parameters code –
Returns

2.4.4 TM1py.Utils.Utils module

class TM1py.Utils.Utils.CaseAndSpaceInsensitiveDict(data=None, **kwargs)


Bases: _abcoll.MutableMapping
A case-and-space-insensitive dict-like object with String keys.
Implements all methods and operations of collections.MutableMapping as well as dict’s copy. Also
provides adjusted_items, adjusted_keys.
All keys are expected to be strings. The structure remembers the case of the last key to be set, and
iter(instance), keys(), items(), iterkeys(), and iteritems() will contain case-sensitive
keys.
However, querying and contains testing is case insensitive: elements = TM1pyElementsDictionary() ele-
ments[‘Travel Expesnses’] = 100 elements[‘travelexpenses’] == 100 # True
Entries are ordered
adjusted_items()
Like iteritems(), but with all adjusted keys.
adjusted_keys()
Like keys(), but with all adjusted keys.
copy()
class TM1py.Utils.Utils.CaseAndSpaceInsensitiveSet(*values)
Bases: _abcoll.MutableSet

2.4. TM1py.Utils package 45


TM1py Documentation, Release 1.0.2

add(value)
Add an element.
copy()
discard(value)
Remove an element. Do not raise an exception if absent.
class TM1py.Utils.Utils.CaseAndSpaceInsensitiveTuplesDict(data=None, **kwargs)
Bases: _abcoll.MutableMapping
A case-and-space-insensitive dict-like object with String-Tuples Keys.
Implements all methods and operations of collections.MutableMapping as well as dict’s copy. Also
provides adjusted_items, adjusted_keys.
All keys are expected to be tuples of strings. The structure remembers the case of the last key to be set, and
iter(instance), keys(), items(), iterkeys(), and iteritems() will contain case-sensitive
keys.
However, querying and contains testing is case insensitive: data = CaseAndSpaceInsensitiveTuplesDict()
data[(‘[Business Unit].[UK]’, ‘[Scenario].[Worst Case]’)] = 1000 data[(‘[BusinessUnit].[UK]’, ‘[Sce-
nario].[worstcase]’)] == 1000 # True data[(‘[Business Unit].[UK]’, ‘[Scenario].[Worst Case]’)] == 1000 #
True
Entries are ordered
adjusted_items()
Like iteritems(), but with all adjusted keys.
adjusted_keys()
Like keys(), but with all adjusted keys.
copy()
TM1py.Utils.Utils.build_cellset_from_pandas_dataframe(df )
Parameters df – a Pandas Dataframe, with dimension-column mapping in correct order. As created
in build_pandas_dataframe_from_cellset
Returns a CaseAndSpaceInsensitiveTuplesDict
TM1py.Utils.Utils.build_content_from_cellset(raw_cellset_as_dict, top=None)
transform raw cellset data into concise dictionary
Parameters
• raw_cellset_as_dict –
• top – Maximum Number of cells
Returns
TM1py.Utils.Utils.build_element_unique_names(dimension_names, element_names, hierar-
chy_names=None)
Create tuple of unique names from dimension, hierarchy and elements
Parameters
• dimension_names –
• element_names –
• hierarchy_names –
Returns Generator

46 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

TM1py.Utils.Utils.build_headers_from_cellset(raw_cellset_as_dict,
force_header_dimensionality=1)
Extract dimension headers from cellset into dictionary of titles (slicers) and headers (row,column,page) * Title
dimensions are in a single list of dicts * Header dimensions are a 2-dimensional list of the element dicts
• The first dimension in the header list is the axis
• The second dimension is the list of elements on the axis

• Dict format: {‘name’: ‘element or compound name’, ‘members’: [ {dict of dimension properties}, . . . ] }
– Stacked headers on an axis will have a compount ‘name’ created by joining the member’s ‘Name’
properties with a ‘/’
– Stacked headers will each be listed in the ‘memebers’ list; Single-element headers will only have one
element in list

Parameters
• raw_cellset_as_dict – raw data from TM1
• force_header_dimensionality – An optional integer (1,2 or 3) to force headers
array to be at least that long
Returns dict : { titles: [ { ‘name’: ‘xx’, ‘members’: {} } ], headers: [axis][ { ‘name’: ‘xx’,
‘members’: {} } ] }

TM1py.Utils.Utils.build_pandas_dataframe_from_cellset(cellset, multiindex=True,
sort_values=True)
Parameters
• cellset –
• multiindex – True or False
• sort_values – Boolean to control sorting in result DataFrame
Returns
TM1py.Utils.Utils.build_ui_arrays_from_cellset(raw_cellset_as_dict, value_precision)
Transform raw 1,2 or 3-dimension cellset data into concise dictionary
• Useful for grids or charting libraries that want an array of cell values per row
• Returns 3-dimensional cell structure for tabbed grids or multiple charts
• Rows and pages are dicts, addressable by their name. Proper order of rows can be obtained in headers[1]
• Example ‘cells’ return format:
‘cells’: {
‘10100’: {
‘Net Operating Income’: [ 19832724.72429739, 20365654.788303416,
20729201.329183243, 20480205.20121749],
‘Revenue’: [ 28981046.50724231, 29512482.207418434, 29913730.038971487,
29563345.9542385]},
‘10200’: {
‘Net Operating Income’: [ 9853293.623709997, 10277650.763958748,
10466934.096533755, 10333095.839474997],

2.4. TM1py.Utils package 47


TM1py Documentation, Release 1.0.2

‘Revenue’: [ 13888143.710000003, 14300216.43, 14502421.63, 14321501.940000001]}


},

Parameters
• raw_cellset_as_dict – raw data from TM1
• value_precision – Integer (optional) specifying number of decimal places to return
Returns dict : { titles: [], headers: [axis][], cells: { Page0: { Row0: { [row values], Row1: [], . . . },
. . . }, . . . } }

TM1py.Utils.Utils.build_ui_dygraph_arrays_from_cellset(raw_cellset_as_dict,
value_precision=None)
Transform raw 1,2 or 3-dimension cellset data into dygraph-friendly format
• Useful for grids or charting libraries that want an array of cell values per column
• Returns 3-dimensional cell structure for tabbed grids or multiple charts
• Example ‘cells’ return format:
‘cells’: {
‘10100’: [ [‘Q1-2004’, 28981046.50724231, 19832724.72429739], [‘Q2-2004’,
29512482.207418434, 20365654.788303416], [‘Q3-2004’, 29913730.038971487,
20729201.329183243], [‘Q4-2004’, 29563345.9542385, 20480205.20121749]],
‘10200’: [ [‘Q1-2004’, 13888143.710000003, 9853293.623709997], [‘Q2-2004’, 14300216.43,
10277650.763958748], [‘Q3-2004’, 14502421.63, 10466934.096533755], [‘Q4-2004’,
14321501.940000001, 10333095.839474997]]
},

Parameters
• raw_cellset_as_dict – raw data from TM1
• value_precision – Integer (optional) specifying number of decimal places to return
Returns dict : { titles: [], headers: [axis][], cells: { Page0: [ [column name, column values], [], . . .
], . . . } }

TM1py.Utils.Utils.case_and_space_insensitive_equals(item1, item2)
TM1py.Utils.Utils.dimension_hierarchy_element_tuple_from_unique_name(element_unique_name)
Extract dimension name, hierarchy name and element name from element unique name. Works with explicit
and implicit hierarchy references.
Parameters element_unique_name – e.g. [d1].[e1] or [d1].[leaves].[e1]
Returns tuple of dimension name, hierarchy name, element name
TM1py.Utils.Utils.dimension_name_from_element_unique_name(element_unique_name)
TM1py.Utils.Utils.element_name_from_element_unique_name(element_unique_name)
TM1py.Utils.Utils.element_names_from_element_unique_names(element_unique_names)
Get tuple of simple element names from the full element unique names
Parameters element_unique_names – tuple of element unique names
([dim1].[hier1].[elem1], . . . )
Returns tuple of element names: (elem1, elem2, . . . )

48 Chapter 2. Subpackages
TM1py Documentation, Release 1.0.2

TM1py.Utils.Utils.element_names_from_element_unqiue_names(element_unique_names)
Get tuple of simple element names from the full element unique names
Parameters element_unique_names – tuple of element unique names
([dim1].[hier1].[elem1], . . . )
Returns tuple of element names: (elem1, elem2, . . . )
TM1py.Utils.Utils.extract_axes_from_cellset(raw_cellset_as_dict)
TM1py.Utils.Utils.extract_unique_names_from_members(members)
Extract list of unique names from part of the cellset response in: [{‘UniqueName’: ‘[dim1].[dim1].[elem1]’,
‘Element’: {‘UniqueName’: ‘[dim1].[dim1].[elem1]’}}, {‘UniqueName’: ‘[dim2].[dim2].[elem3]’, ‘Element’:
{‘UniqueName’: ‘[dim2].[dim2].[elem3]’}}] out: [“[dim1].[dim1].[elem1]”, “[dim2].[dim2].[elem3]”]
Parameters members – dictionary
Returns list of unique names
TM1py.Utils.Utils.get_all_servers_from_adminhost(adminhost=’localhost’)
Ask Adminhost for TM1 Servers
Parameters adminhost – IP or DNS Alias of the adminhost
Returns List of Servers (instances of the TM1py.Server class)
TM1py.Utils.Utils.hierarchy_name_from_element_unique_name(element_unique_name)
TM1py.Utils.Utils.load_all_bedrocks_from_github()
Load all Bedrocks from GitHub as TM1py.Process instances
Returns
TM1py.Utils.Utils.load_bedrock_from_github(bedrock_process_name)
Load bedrock from GitHub as TM1py.Process instance
Parameters bedrock_process_name –
Returns
TM1py.Utils.Utils.lower_and_drop_spaces(item)
TM1py.Utils.Utils.sort_coordinates(cube_dimensions, unsorted_coordinates)

2.4.5 Module contents

2.4. TM1py.Utils package 49


TM1py Documentation, Release 1.0.2

50 Chapter 2. Subpackages
Python Module Index

t TM1py.Services.SecurityService, 37
TM1py, 1 TM1py.Services.ServerService, 39
TM1py.Exceptions, 4 TM1py.Services.SubsetService, 40
TM1py.Exceptions.Exceptions, 3 TM1py.Services.TM1Service, 42
TM1py.Objects, 16 TM1py.Services.ViewService, 42
TM1py.Objects.Annotation, 4 TM1py.Utils, 49
TM1py.Objects.Application, 5 TM1py.Utils.MDXUtils, 44
TM1py.Objects.Axis, 5 TM1py.Utils.TIObfuscator, 45
TM1py.Objects.Chore, 5 TM1py.Utils.Utils, 45
TM1py.Objects.ChoreFrequency, 6
TM1py.Objects.ChoreStartTime, 6
TM1py.Objects.ChoreTask, 7
TM1py.Objects.Cube, 7
TM1py.Objects.Dimension, 8
TM1py.Objects.Element, 8
TM1py.Objects.ElementAttribute, 9
TM1py.Objects.Hierarchy, 9
TM1py.Objects.MDXView, 10
TM1py.Objects.NativeView, 10
TM1py.Objects.Process, 12
TM1py.Objects.Rules, 14
TM1py.Objects.Server, 14
TM1py.Objects.Subset, 14
TM1py.Objects.TM1Object, 15
TM1py.Objects.User, 15
TM1py.Objects.View, 16
TM1py.Services, 44
TM1py.Services.AnnotationService, 16
TM1py.Services.ApplicationService, 17
TM1py.Services.CellService, 17
TM1py.Services.ChoreService, 26
TM1py.Services.CubeService, 27
TM1py.Services.DimensionService, 29
TM1py.Services.ElementService, 30
TM1py.Services.HierarchyService, 32
TM1py.Services.MonitoringService, 33
TM1py.Services.ObjectService, 33
TM1py.Services.ProcessService, 34
TM1py.Services.RESTService, 36

51
TM1py Documentation, Release 1.0.2

52 Python Module Index


Index

A add_user_to_groups()
activate() (TM1py.Objects.Chore.Chore method), 5 (TM1py.Services.SecurityService.SecurityService
activate() (TM1py.Services.ChoreService.ChoreService method), 37
method), 26 add_variable() (TM1py.Objects.Process.Process
activate_transactionlog() method), 12
(TM1py.Services.CellService.CellService adjusted_items() (TM1py.Utils.Utils.CaseAndSpaceInsensitiveDict
method), 17 method), 45
active (TM1py.Objects.Chore.Chore attribute), 5 adjusted_items() (TM1py.Utils.Utils.CaseAndSpaceInsensitiveTuples
add() (TM1py.Objects.ChoreStartTime.ChoreStartTime method), 46
method), 6 adjusted_keys() (TM1py.Utils.Utils.CaseAndSpaceInsensitiveDict
add() (TM1py.Utils.Utils.CaseAndSpaceInsensitiveSet method), 45
method), 45 adjusted_keys() (TM1py.Utils.Utils.CaseAndSpaceInsensitiveTuplesD
add_column() (TM1py.Objects.NativeView.NativeView method), 46
method), 10 alias (TM1py.Objects.Subset.Subset attribute), 15
add_edge() (TM1py.Objects.Hierarchy.Hierarchy Annotation (class in TM1py.Objects.Annotation), 4
method), 9 AnnotationService (class in
add_element() (TM1py.Objects.Hierarchy.Hierarchy TM1py.Services.AnnotationService), 16
method), 9 AnonymousSubset (class in TM1py.Objects.Subset),
add_element_attribute() 14
(TM1py.Objects.Hierarchy.Hierarchy method), Application (class in TM1py.Objects.Application), 5
9 ApplicationService (class in
add_elements() (TM1py.Objects.Subset.Subset TM1py.Services.ApplicationService), 17
method), 15 as_MDX (TM1py.Objects.NativeView.NativeView at-
add_generated_string_to_code() tribute), 11
(TM1py.Objects.Process.Process static attribute_type (TM1py.Objects.ElementAttribute.ElementAttribute
method), 12 attribute), 9
add_group() (TM1py.Objects.User.User method), 15 auto_generated_string
add_hierarchy() (TM1py.Objects.Dimension.Dimension (TM1py.Objects.Process.Process attribute), 13
method), 8
add_http_header() B
(TM1py.Services.RESTService.RESTService b64_decode_password()
method), 37 (TM1py.Services.RESTService.RESTService
add_parameter() (TM1py.Objects.Process.Process static method), 37
method), 12 balanced (TM1py.Objects.Hierarchy.Hierarchy at-
add_row() (TM1py.Objects.NativeView.NativeView tribute), 9
method), 11 begin_generated_statements
add_task() (TM1py.Objects.Chore.Chore method), 5 (TM1py.Objects.Process.Process attribute), 13
add_title() (TM1py.Objects.NativeView.NativeView body (TM1py.Objects.Annotation.Annotation attribute),
method), 11 4

53
TM1py Documentation, Release 1.0.2

body (TM1py.Objects.Axis.ViewAxisSelection attribute), method), 33


5 case_and_space_insensitive_equals() (in
body (TM1py.Objects.Axis.ViewTitleSelection attribute), module TM1py.Utils.Utils), 48
5 CaseAndSpaceInsensitiveDict (class in
body (TM1py.Objects.Chore.Chore attribute), 5 TM1py.Utils.Utils), 45
body (TM1py.Objects.ChoreTask.ChoreTask attribute), 7 CaseAndSpaceInsensitiveSet (class in
body (TM1py.Objects.Cube.Cube attribute), 7 TM1py.Utils.Utils), 45
body (TM1py.Objects.Dimension.Dimension attribute), CaseAndSpaceInsensitiveTuplesDict (class
8 in TM1py.Utils.Utils), 46
body (TM1py.Objects.Element.Element attribute), 8 CellService (class in TM1py.Services.CellService),
body (TM1py.Objects.ElementAttribute.ElementAttribute 17
attribute), 9 Chore (class in TM1py.Objects.Chore), 5
body (TM1py.Objects.Hierarchy.Hierarchy attribute), 9 ChoreFrequency (class in
body (TM1py.Objects.MDXView.MDXView attribute), 10 TM1py.Objects.ChoreFrequency), 6
body (TM1py.Objects.NativeView.NativeView attribute), ChoreService (class in
11 TM1py.Services.ChoreService), 26
body (TM1py.Objects.Process.Process attribute), 13 ChoreStartTime (class in
body (TM1py.Objects.Subset.Subset attribute), 15 TM1py.Objects.ChoreStartTime), 6
body (TM1py.Objects.TM1Object.TM1Object attribute), ChoreTask (class in TM1py.Objects.ChoreTask), 7
15 columns (TM1py.Objects.NativeView.NativeView at-
body (TM1py.Objects.User.User attribute), 16 tribute), 11
body_as_dict (TM1py.Objects.Axis.ViewAxisSelection comment_value (TM1py.Objects.Annotation.Annotation
attribute), 5 attribute), 4
body_as_dict (TM1py.Objects.Chore.Chore at- compile() (TM1py.Services.ProcessService.ProcessService
tribute), 5 method), 34
body_as_dict (TM1py.Objects.ChoreTask.ChoreTask connection (TM1py.Services.TM1Service.TM1Service
attribute), 7 attribute), 42
body_as_dict (TM1py.Objects.Dimension.Dimension construct_body() (TM1py.Objects.Chore.Chore
attribute), 8 method), 5
body_as_dict (TM1py.Objects.Element.Element at- construct_body() (TM1py.Objects.MDXView.MDXView
tribute), 8 method), 10
body_as_dict (TM1py.Objects.ElementAttribute.ElementAttribute
construct_body() (TM1py.Objects.User.User
attribute), 9 method), 16
body_as_dict (TM1py.Objects.Hierarchy.Hierarchy construct_mdx() (in module
attribute), 9 TM1py.Utils.MDXUtils), 44
body_as_dict (TM1py.Objects.Subset.Subset at- construct_mdx_axis() (in module
tribute), 15 TM1py.Utils.MDXUtils), 44
build_cellset_from_pandas_dataframe() contains_element()
(in module TM1py.Utils.Utils), 46 (TM1py.Objects.Hierarchy.Hierarchy method),
build_content_from_cellset() (in module 9
TM1py.Utils.Utils), 46 contains_hierarchy()
build_element_unique_names() (in module (TM1py.Objects.Dimension.Dimension
TM1py.Utils.Utils), 46 method), 8
build_headers_from_cellset() (in module copy() (TM1py.Utils.Utils.CaseAndSpaceInsensitiveDict
TM1py.Utils.Utils), 46 method), 45
build_pandas_dataframe_from_cellset() copy() (TM1py.Utils.Utils.CaseAndSpaceInsensitiveSet
(in module TM1py.Utils.Utils), 47 method), 46
build_ui_arrays_from_cellset() (in module copy() (TM1py.Utils.Utils.CaseAndSpaceInsensitiveTuplesDict
TM1py.Utils.Utils), 47 method), 46
build_ui_dygraph_arrays_from_cellset() create() (TM1py.Services.AnnotationService.AnnotationService
(in module TM1py.Utils.Utils), 48 method), 16
create() (TM1py.Services.ChoreService.ChoreService
C method), 26
create()
cancel_thread() (TM1py.Services.MonitoringService.MonitoringService (TM1py.Services.CubeService.CubeService

54 Index
TM1py Documentation, Release 1.0.2

method), 28 datasource_data_source_name_for_server
create() (TM1py.Services.DimensionService.DimensionService (TM1py.Objects.Process.Process attribute), 13
method), 29 datasource_password
create() (TM1py.Services.ElementService.ElementService (TM1py.Objects.Process.Process attribute), 13
method), 30 datasource_query (TM1py.Objects.Process.Process
create() (TM1py.Services.HierarchyService.HierarchyService attribute), 13
method), 32 datasource_subset
create() (TM1py.Services.ProcessService.ProcessService (TM1py.Objects.Process.Process attribute), 13
method), 34 datasource_type (TM1py.Objects.Process.Process
create() (TM1py.Services.SubsetService.SubsetService attribute), 13
method), 40 datasource_user_name
create() (TM1py.Services.ViewService.ViewService (TM1py.Objects.Process.Process attribute), 13
method), 42 datasource_uses_unicode
create_cellset() (TM1py.Services.CellService.CellService (TM1py.Objects.Process.Process attribute), 13
method), 17 datasource_view (TM1py.Objects.Process.Process
create_cellset_from_view() attribute), 13
(TM1py.Services.CellService.CellService days (TM1py.Objects.ChoreFrequency.ChoreFrequency
method), 18 attribute), 6
create_element_attribute() deactivate() (TM1py.Objects.Chore.Chore method),
(TM1py.Services.ElementService.ElementService 5
method), 30 deactivate() (TM1py.Services.ChoreService.ChoreService
create_element_attributes_through_ti() method), 26
(TM1py.Services.DimensionService.DimensionService
deactivate_activate() (in module
method), 29 TM1py.Services.ChoreService), 27
create_group() (TM1py.Services.SecurityService.SecurityService
deactivate_transactionlog()
method), 38 (TM1py.Services.CellService.CellService
create_user() (TM1py.Services.SecurityService.SecurityService method), 18
method), 38 default_hierarchy
created (TM1py.Objects.Annotation.Annotation (TM1py.Objects.Dimension.Dimension at-
attribute), 4 tribute), 8
Cube (class in TM1py.Objects.Cube), 7 default_member (TM1py.Objects.Hierarchy.Hierarchy
cube (TM1py.Objects.View.View attribute), 16 attribute), 9
CubeService (class in TM1py.Services.CubeService), delete() (TM1py.Services.AnnotationService.AnnotationService
27 method), 17
curly_braces() (in module TM1py.Utils.MDXUtils), delete() (TM1py.Services.ChoreService.ChoreService
44 method), 26
delete() (TM1py.Services.CubeService.CubeService
D method), 28
data_procedure (TM1py.Objects.Process.Process delete() (TM1py.Services.DimensionService.DimensionService
attribute), 13 method), 29
datasource_ascii_decimal_separator delete() (TM1py.Services.ElementService.ElementService
(TM1py.Objects.Process.Process attribute), 13 method), 30
datasource_ascii_delimiter_char delete() (TM1py.Services.HierarchyService.HierarchyService
(TM1py.Objects.Process.Process attribute), 13 method), 32
datasource_ascii_delimiter_type delete() (TM1py.Services.ProcessService.ProcessService
(TM1py.Objects.Process.Process attribute), 13 method), 34
datasource_ascii_header_records DELETE() (TM1py.Services.RESTService.RESTService
(TM1py.Objects.Process.Process attribute), 13 method), 36
datasource_ascii_quote_character delete() (TM1py.Services.SubsetService.SubsetService
(TM1py.Objects.Process.Process attribute), 13 method), 41
datasource_ascii_thousand_separator delete() (TM1py.Services.ViewService.ViewService
(TM1py.Objects.Process.Process attribute), 13 method), 42
datasource_data_source_name_for_client delete_cellset() (TM1py.Services.CellService.CellService
(TM1py.Objects.Process.Process attribute), 13 method), 18

Index 55
TM1py Documentation, Release 1.0.2

delete_element_attribute() dst_sensitivity (TM1py.Objects.Chore.Chore at-


(TM1py.Services.ElementService.ElementService tribute), 5
method), 30
delete_elements_from_static_subset() E
(TM1py.Services.SubsetService.SubsetService edges (TM1py.Objects.Hierarchy.Hierarchy attribute),
method), 41 9
delete_group() (TM1py.Services.SecurityService.SecurityService
EDGES_WORKAROUND_VERSIONS
method), 38 (TM1py.Services.HierarchyService.HierarchyService
delete_user() (TM1py.Services.SecurityService.SecurityService attribute), 32
method), 38 Element (class in TM1py.Objects.Element), 8
determine_actual_group_name() element_attributes
(TM1py.Services.SecurityService.SecurityService (TM1py.Objects.Element.Element attribute), 8
method), 38 element_attributes
determine_actual_object_name() (TM1py.Objects.Hierarchy.Hierarchy at-
(TM1py.Services.ObjectService.ObjectService tribute), 9
method), 33 element_name_from_element_unique_name()
determine_actual_user_name() (in module TM1py.Utils.Utils), 48
(TM1py.Services.SecurityService.SecurityService element_names_from_element_unique_names()
method), 38 (in module TM1py.Utils.Utils), 48
determine_selection_type() element_names_from_element_unqiue_names()
(TM1py.Utils.MDXUtils.DimensionSelection (in module TM1py.Utils.Utils), 48
static method), 44 element_type (TM1py.Objects.Element.Element at-
Dimension (class in TM1py.Objects.Dimension), 8 tribute), 8
dimension_hierarchy_element_tuple_from_unique_name() ElementAttribute (class in
(in module TM1py.Utils.Utils), 48 TM1py.Objects.ElementAttribute), 9
dimension_name (TM1py.Objects.Axis.ViewAxisSelection elements (TM1py.Objects.Hierarchy.Hierarchy at-
attribute), 5 tribute), 10
dimension_name (TM1py.Objects.Axis.ViewTitleSelection elements (TM1py.Objects.Subset.Subset attribute), 15
attribute), 5 ElementService (class in
dimension_name (TM1py.Objects.Hierarchy.Hierarchy TM1py.Services.ElementService), 30
attribute), 9 end_generated_statements
dimension_name (TM1py.Objects.Subset.Subset at- (TM1py.Objects.Process.Process attribute), 13
tribute), 15 epilog_procedure (TM1py.Objects.Process.Process
dimension_name_from_element_unique_name() attribute), 13
(in module TM1py.Utils.Utils), 48 execute() (TM1py.Services.ProcessService.ProcessService
dimensional_context method), 34
(TM1py.Objects.Annotation.Annotation at- execute_chore() (TM1py.Services.ChoreService.ChoreService
tribute), 4 method), 27
dimensions (TM1py.Objects.Cube.Cube attribute), 7 execute_mdx() (TM1py.Services.CellService.CellService
DimensionSelection (class in method), 18
TM1py.Utils.MDXUtils), 44 execute_mdx() (TM1py.Services.DimensionService.DimensionService
DimensionService (class in method), 29
TM1py.Services.DimensionService), 29 execute_mdx_cellcount()
disable_http_warnings() (TM1py.Services.CellService.CellService
(TM1py.Services.RESTService.RESTService method), 18
static method), 37 execute_mdx_csv()
discard() (TM1py.Utils.Utils.CaseAndSpaceInsensitiveSet (TM1py.Services.CellService.CellService
method), 46 method), 18
disconnect_user() execute_mdx_dataframe()
(TM1py.Services.MonitoringService.MonitoringService (TM1py.Services.CellService.CellService
method), 33 method), 18
drop_parameter_types() execute_mdx_dataframe_pivot()
(TM1py.Objects.Process.Process method), (TM1py.Services.CellService.CellService
13 method), 18

56 Index
TM1py Documentation, Release 1.0.2

execute_mdx_raw() (TM1py.Services.ProcessService.ProcessService
(TM1py.Services.CellService.CellService method), 34
method), 19 execution_mode (TM1py.Objects.Chore.Chore at-
execute_mdx_rows_and_values() tribute), 5
(TM1py.Services.CellService.CellService exists() (TM1py.Services.ChoreService.ChoreService
method), 19 method), 27
execute_mdx_ui_array() exists() (TM1py.Services.CubeService.CubeService
(TM1py.Services.CellService.CellService method), 28
method), 19 exists() (TM1py.Services.DimensionService.DimensionService
execute_mdx_ui_dygraph() method), 29
(TM1py.Services.CellService.CellService exists() (TM1py.Services.ElementService.ElementService
method), 20 method), 30
execute_mdx_values() exists() (TM1py.Services.HierarchyService.HierarchyService
(TM1py.Services.CellService.CellService method), 32
method), 20 exists() (TM1py.Services.ProcessService.ProcessService
execute_message_log_delta_request() method), 34
(TM1py.Services.ServerService.ServerService exists() (TM1py.Services.SubsetService.SubsetService
method), 39 method), 41
execute_ti_code() exists() (TM1py.Services.ViewService.ViewService
(TM1py.Services.ProcessService.ProcessService method), 42
method), 34 expression (TM1py.Objects.Subset.Subset attribute),
execute_transaction_log_delta_request() 15
(TM1py.Services.ServerService.ServerService EXPRESSION (TM1py.Utils.MDXUtils.DimensionSelection
method), 39 attribute), 44
execute_view() (TM1py.Services.CellService.CellService
extract_axes_from_cellset() (in module
method), 20 TM1py.Utils.Utils), 49
execute_view_cellcount() extract_cellset()
(TM1py.Services.CellService.CellService (TM1py.Services.CellService.CellService
method), 21 method), 23
execute_view_csv() extract_cellset_cellcount()
(TM1py.Services.CellService.CellService (TM1py.Services.CellService.CellService
method), 21 method), 23
execute_view_dataframe() extract_cellset_composition()
(TM1py.Services.CellService.CellService (TM1py.Services.CellService.CellService
method), 21 method), 24
execute_view_dataframe_pivot() extract_cellset_csv()
(TM1py.Services.CellService.CellService (TM1py.Services.CellService.CellService
method), 21 method), 24
execute_view_raw() extract_cellset_dataframe_pivot()
(TM1py.Services.CellService.CellService (TM1py.Services.CellService.CellService
method), 21 method), 24
execute_view_rows_and_values() extract_cellset_raw()
(TM1py.Services.CellService.CellService (TM1py.Services.CellService.CellService
method), 22 method), 24
execute_view_ui_array() extract_cellset_rows_and_values()
(TM1py.Services.CellService.CellService (TM1py.Services.CellService.CellService
method), 22 method), 24
execute_view_ui_dygraph() extract_cellset_values()
(TM1py.Services.CellService.CellService (TM1py.Services.CellService.CellService
method), 22 method), 24
execute_view_values() extract_unique_names_from_members() (in
(TM1py.Services.CellService.CellService module TM1py.Utils.Utils), 49
method), 23
execute_with_return()

Index 57
TM1py Documentation, Release 1.0.2

F method), 13
feeder_statements (TM1py.Objects.Rules.Rules from_json() (TM1py.Objects.Subset.AnonymousSubset
attribute), 14 class method), 14
feedstrings (TM1py.Objects.Cube.Cube attribute), 7 from_json() (TM1py.Objects.Subset.Subset class
feedstrings (TM1py.Objects.Rules.Rules attribute), method), 15
14 from_json() (TM1py.Objects.User.User class
format_string (TM1py.Objects.NativeView.NativeView method), 16
attribute), 11 from_string() (TM1py.Objects.ChoreFrequency.ChoreFrequency
frequency (TM1py.Objects.Chore.Chore attribute), 5 class method), 6
from_string()
frequency_string (TM1py.Objects.ChoreFrequency.ChoreFrequency (TM1py.Objects.ChoreStartTime.ChoreStartTime
attribute), 6 class method), 6
friendly_name (TM1py.Objects.User.User attribute),
16 G
from_dict() (TM1py.Objects.Chore.Chore class generate_unique_string() (in module
method), 6 TM1py.Utils.TIObfuscator), 45
from_dict() (TM1py.Objects.ChoreTask.ChoreTask get() (TM1py.Services.AnnotationService.AnnotationService
class method), 7 method), 17
from_dict() (TM1py.Objects.Cube.Cube class get() (TM1py.Services.ApplicationService.ApplicationService
method), 7 method), 17
from_dict() (TM1py.Objects.Dimension.Dimension get() (TM1py.Services.ChoreService.ChoreService
class method), 8 method), 27
from_dict() (TM1py.Objects.Element.Element static get() (TM1py.Services.CubeService.CubeService
method), 8 method), 28
get()
from_dict() (TM1py.Objects.ElementAttribute.ElementAttribute(TM1py.Services.DimensionService.DimensionService
class method), 9 method), 29
from_dict() (TM1py.Objects.Hierarchy.Hierarchy get() (TM1py.Services.ElementService.ElementService
class method), 10 method), 30
from_dict() (TM1py.Objects.MDXView.MDXView get() (TM1py.Services.HierarchyService.HierarchyService
class method), 10 method), 32
from_dict() (TM1py.Objects.NativeView.NativeView get() (TM1py.Services.ProcessService.ProcessService
class method), 11 method), 35
from_dict() (TM1py.Objects.Process.Process class GET() (TM1py.Services.RESTService.RESTService
method), 13 method), 36
from_dict() (TM1py.Objects.Subset.AnonymousSubset get() (TM1py.Services.SubsetService.SubsetService
class method), 14 method), 41
from_dict() (TM1py.Objects.Subset.Subset class get() (TM1py.Services.ViewService.ViewService
method), 15 method), 43
from_dict() (TM1py.Objects.User.User class get_active_configuration()
method), 16 (TM1py.Services.ServerService.ServerService
from_json() (TM1py.Objects.Annotation.Annotation method), 39
class method), 4 get_active_users()
from_json() (TM1py.Objects.Chore.Chore class (TM1py.Services.MonitoringService.MonitoringService
method), 6 method), 33
from_json() (TM1py.Objects.Cube.Cube class get_admin_host() (TM1py.Services.ServerService.ServerService
method), 7 method), 39
from_json() (TM1py.Objects.Dimension.Dimension get_all() (TM1py.Services.AnnotationService.AnnotationService
class method), 8 method), 17
get_all() (TM1py.Services.ChoreService.ChoreService
from_json() (TM1py.Objects.ElementAttribute.ElementAttribute
class method), 9 method), 27
from_json() (TM1py.Objects.MDXView.MDXView get_all() (TM1py.Services.CubeService.CubeService
class method), 10 method), 28
from_json() (TM1py.Objects.NativeView.NativeView get_all() (TM1py.Services.ProcessService.ProcessService
class method), 11 method), 35
from_json() (TM1py.Objects.Process.Process class

58 Index
TM1py Documentation, Release 1.0.2

get_all() (TM1py.Services.ViewService.ViewService (TM1py.Services.ElementService.ElementService


method), 43 method), 30
get_all_defined_variables() (in module get_element_names()
TM1py.Utils.TIObfuscator), 45 (TM1py.Services.ElementService.ElementService
get_all_groups() (TM1py.Services.SecurityService.SecurityService
method), 31
method), 38 get_elements() (TM1py.Services.ElementService.ElementService
get_all_names() (TM1py.Services.ChoreService.ChoreService method), 31
method), 27 get_elements_filtered_by_attribute()
get_all_names() (TM1py.Services.CubeService.CubeService (TM1py.Services.ElementService.ElementService
method), 28 method), 31
get_all_names() (TM1py.Services.DimensionService.DimensionService
get_error_log_file_content()
method), 30 (TM1py.Services.ProcessService.ProcessService
get_all_names() (TM1py.Services.HierarchyService.HierarchyService
method), 35
method), 32 get_groups() (TM1py.Services.SecurityService.SecurityService
get_all_names() (TM1py.Services.ProcessService.ProcessService method), 38
method), 35 get_hierarchy() (TM1py.Objects.Dimension.Dimension
get_all_names() (TM1py.Services.SubsetService.SubsetService method), 8
method), 41 get_hierarchy_summary()
get_all_names() (TM1py.Services.ViewService.ViewService (TM1py.Services.HierarchyService.HierarchyService
method), 43 method), 32
get_all_process_names_filtered() get_http_header()
(TM1py.Services.ProcessService.ProcessService (TM1py.Services.RESTService.RESTService
method), 35 method), 37
get_all_servers_from_adminhost() (in mod- get_last_message_from_processerrorlog()
ule TM1py.Utils.Utils), 49 (TM1py.Services.ProcessService.ProcessService
get_all_user_names() method), 35
(TM1py.Services.SecurityService.SecurityService get_last_process_message_from_messagelog()
method), 38 (TM1py.Services.ServerService.ServerService
get_all_users() (TM1py.Services.SecurityService.SecurityService
method), 39
method), 38 get_leaf_element_names()
get_cellset_cells_count() (TM1py.Services.ElementService.ElementService
(TM1py.Services.CellService.CellService method), 31
method), 24 get_leaf_elements()
get_configuration() (TM1py.Services.ElementService.ElementService
(TM1py.Services.ServerService.ServerService method), 31
method), 39 get_leaves_under_consolidation()
get_control_cubes() (TM1py.Services.ElementService.ElementService
(TM1py.Services.CubeService.CubeService method), 31
method), 28 get_mdx_view() (TM1py.Services.ViewService.ViewService
get_current_user() method), 43
(TM1py.Services.SecurityService.SecurityService get_members_under_consolidation()
method), 38 (TM1py.Services.ElementService.ElementService
get_data_directory() method), 31
(TM1py.Services.ServerService.ServerService get_message_log_entries()
method), 39 (TM1py.Services.ServerService.ServerService
get_default_member() method), 39
(TM1py.Services.HierarchyService.HierarchyService
get_model_cubes()
method), 32 (TM1py.Services.CubeService.CubeService
get_dimension_names() method), 28
(TM1py.Services.CubeService.CubeService get_native_view()
method), 28 (TM1py.Services.ViewService.ViewService
get_element() (TM1py.Objects.Hierarchy.Hierarchy method), 43
method), 10 get_processerrorlogs()
get_element_attributes() (TM1py.Services.ProcessService.ProcessService

Index 59
TM1py Documentation, Release 1.0.2

method), 35 hierarchy_name_from_element_unique_name()
get_product_version() (in module TM1py.Utils.Utils), 49
(TM1py.Services.ServerService.ServerService hierarchy_names (TM1py.Objects.Dimension.Dimension
method), 40 attribute), 8
get_random_intersection() HierarchyService (class in
(TM1py.Services.CubeService.CubeService TM1py.Services.HierarchyService), 32
method), 28 hours (TM1py.Objects.ChoreFrequency.ChoreFrequency
get_server_name() attribute), 6
(TM1py.Services.ServerService.ServerService httpmethod() (in module
method), 40 TM1py.Services.RESTService), 37
get_static_configuration()
(TM1py.Services.ServerService.ServerService I
method), 40 id (TM1py.Objects.Annotation.Annotation attribute), 4
get_storage_dimension_order() index (TM1py.Objects.Element.Element attribute), 8
(TM1py.Services.CubeService.CubeService init_analytics() (TM1py.Objects.Rules.Rules
method), 28 method), 14
get_threads() (TM1py.Services.MonitoringService.MonitoringService
initialize_message_log_delta_requests()
method), 33 (TM1py.Services.ServerService.ServerService
get_transaction_log_entries() method), 40
(TM1py.Services.ServerService.ServerService initialize_transaction_log_delta_requests()
method), 40 (TM1py.Services.ServerService.ServerService
get_user() (TM1py.Services.SecurityService.SecurityService method), 40
method), 38 is_admin (TM1py.Objects.User.User attribute), 16
get_user_names_from_group() is_connected() (TM1py.Services.RESTService.RESTService
(TM1py.Services.SecurityService.SecurityService method), 37
method), 39 is_dynamic (TM1py.Objects.Subset.Subset attribute),
get_users_from_group() 15
(TM1py.Services.SecurityService.SecurityService is_static (TM1py.Objects.Subset.Subset attribute),
method), 39 15
get_value() (TM1py.Services.CellService.CellService ITERABLE (TM1py.Utils.MDXUtils.DimensionSelection
method), 24 attribute), 44
get_view_content()
(TM1py.Services.CellService.CellService K
method), 25 keywords (TM1py.Objects.Rules.Rules attribute), 14
groups (TM1py.Objects.User.User attribute), 16
L
H last_updated (TM1py.Objects.Annotation.Annotation
has_feeders (TM1py.Objects.Rules.Rules attribute), attribute), 4
14 last_updated_by (TM1py.Objects.Annotation.Annotation
has_rules (TM1py.Objects.Cube.Cube attribute), 7 attribute), 4
has_security_access load_all_bedrocks_from_github() (in mod-
(TM1py.Objects.Process.Process attribute), 13 ule TM1py.Utils.Utils), 49
HEADERS (TM1py.Services.RESTService.RESTService load_bedrock_from_github() (in module
attribute), 36 TM1py.Utils.Utils), 49
hierarchies (TM1py.Objects.Dimension.Dimension logout() (TM1py.Services.RESTService.RESTService
attribute), 8 method), 37
Hierarchy (class in TM1py.Objects.Hierarchy), 9 logout() (TM1py.Services.TM1Service.TM1Service
hierarchy_name (TM1py.Objects.Axis.ViewAxisSelection method), 42
attribute), 5 lower_and_drop_spaces() (in module
hierarchy_name (TM1py.Objects.Axis.ViewTitleSelection TM1py.Utils.Utils), 49
attribute), 5
hierarchy_name (TM1py.Objects.Subset.Subset at- M
tribute), 15
MDX (TM1py.Objects.MDXView.MDXView attribute), 10

60 Index
TM1py Documentation, Release 1.0.2

MDX (TM1py.Objects.NativeView.NativeView attribute), prolog_procedure (TM1py.Objects.Process.Process


10 attribute), 13
MDXView (class in TM1py.Objects.MDXView), 10
metadata_procedure R
(TM1py.Objects.Process.Process attribute), 13 read_cube_name_from_mdx() (in module
minutes (TM1py.Objects.ChoreFrequency.ChoreFrequency TM1py.Utils.MDXUtils), 44
attribute), 6 read_dimension_composition_from_mdx()
MonitoringService (class in (in module TM1py.Utils.MDXUtils), 44
TM1py.Services.MonitoringService), 33 read_dimension_composition_from_mdx_set()
move() (TM1py.Objects.Annotation.Annotation (in module TM1py.Utils.MDXUtils), 44
method), 4 read_dimension_composition_from_mdx_set_or_tuple()
(in module TM1py.Utils.MDXUtils), 45
N read_dimension_composition_from_mdx_tuple()
name (TM1py.Objects.Chore.Chore attribute), 6 (in module TM1py.Utils.MDXUtils), 45
name (TM1py.Objects.Cube.Cube attribute), 7 reason (TM1py.Exceptions.Exceptions.TM1pyException
name (TM1py.Objects.Dimension.Dimension attribute), attribute), 3
8 relative_proportional_spread()
name (TM1py.Objects.Element.Element attribute), 8 (TM1py.Services.CellService.CellService
name (TM1py.Objects.ElementAttribute.ElementAttribute method), 25
attribute), 9 remove_column() (TM1py.Objects.NativeView.NativeView
name (TM1py.Objects.Hierarchy.Hierarchy attribute), 10 method), 11
name (TM1py.Objects.Process.Process attribute), 13 remove_comment_lines() (in module
name (TM1py.Objects.Subset.Subset attribute), 15 TM1py.Utils.TIObfuscator), 45
name (TM1py.Objects.User.User attribute), 16 remove_edge() (TM1py.Objects.Hierarchy.Hierarchy
name (TM1py.Objects.View.View attribute), 16 method), 10
NativeView (class in TM1py.Objects.NativeView), 10 remove_edges() (TM1py.Objects.Hierarchy.Hierarchy
method), 10
O remove_edges_related_to_element()
obfuscate_code() (in module (TM1py.Objects.Hierarchy.Hierarchy method),
TM1py.Utils.TIObfuscator), 45 10
obfuscate_process() (in module remove_element() (TM1py.Objects.Hierarchy.Hierarchy
TM1py.Utils.TIObfuscator), 45 method), 10
object_name (TM1py.Objects.Annotation.Annotation remove_element_attribute()
attribute), 4 (TM1py.Objects.Hierarchy.Hierarchy method),
ObjectService (class in 10
TM1py.Services.ObjectService), 33 remove_generated_code() (in module
odata_track_changes_header() (in module TM1py.Utils.TIObfuscator), 45
TM1py.Services.ServerService), 40 remove_group() (TM1py.Objects.User.User
method), 16
P remove_hierarchy()
parameters (TM1py.Objects.ChoreTask.ChoreTask at- (TM1py.Objects.Dimension.Dimension
tribute), 7 method), 8
parameters (TM1py.Objects.Process.Process at- remove_http_header()
tribute), 13 (TM1py.Services.RESTService.RESTService
password (TM1py.Objects.User.User attribute), 16 method), 37
PATCH() (TM1py.Services.RESTService.RESTService remove_parameter()
method), 36 (TM1py.Objects.Process.Process method),
POST() (TM1py.Services.RESTService.RESTService 13
method), 36 remove_row() (TM1py.Objects.NativeView.NativeView
Process (class in TM1py.Objects.Process), 12 method), 11
process_name (TM1py.Objects.ChoreTask.ChoreTask remove_title() (TM1py.Objects.NativeView.NativeView
attribute), 7 method), 11
ProcessService (class in remove_user_from_group()
TM1py.Services.ProcessService), 34 (TM1py.Services.SecurityService.SecurityService

Index 61
TM1py Documentation, Release 1.0.2

method), 39 split_mdx() (in module TM1py.Utils.MDXUtils), 45


remove_variable() start_time (TM1py.Objects.Chore.Chore attribute), 6
(TM1py.Objects.Process.Process method), start_time_string
14 (TM1py.Objects.ChoreStartTime.ChoreStartTime
reschedule() (TM1py.Objects.Chore.Chore method), attribute), 6
6 status_code (TM1py.Exceptions.Exceptions.TM1pyException
response (TM1py.Exceptions.Exceptions.TM1pyException attribute), 3
attribute), 3 step (TM1py.Objects.ChoreTask.ChoreTask attribute), 7
restore_from_file() Subset (class in TM1py.Objects.Subset), 15
(TM1py.Services.TM1Service.TM1Service subset (TM1py.Objects.Axis.ViewAxisSelection at-
class method), 42 tribute), 5
RESTService (class in TM1py.Services.RESTService), subset (TM1py.Objects.Axis.ViewTitleSelection at-
36 tribute), 5
rows (TM1py.Objects.NativeView.NativeView attribute), SUBSET (TM1py.Utils.MDXUtils.DimensionSelection
12 attribute), 44
rule_statements (TM1py.Objects.Rules.Rules at- subsets (TM1py.Objects.Hierarchy.Hierarchy at-
tribute), 14 tribute), 10
Rules (class in TM1py.Objects.Rules), 14 SubsetService (class in
rules (TM1py.Objects.Cube.Cube attribute), 7 TM1py.Services.SubsetService), 40
rules_analytics (TM1py.Objects.Rules.Rules at- substract() (TM1py.Objects.ChoreStartTime.ChoreStartTime
tribute), 14 method), 6
suppress_empty_cells
S (TM1py.Objects.NativeView.NativeView at-
save_data() (TM1py.Services.ServerService.ServerService tribute), 12
method), 40 suppress_empty_columns
save_to_file() (TM1py.Services.TM1Service.TM1Service (TM1py.Objects.NativeView.NativeView at-
method), 42 tribute), 12
seconds (TM1py.Objects.ChoreFrequency.ChoreFrequency suppress_empty_rows
attribute), 6 (TM1py.Objects.NativeView.NativeView at-
security_refresh() tribute), 12
(TM1py.Services.SecurityService.SecurityService
method), 39 T
SecurityService (class in tasks (TM1py.Objects.Chore.Chore attribute), 6
TM1py.Services.SecurityService), 37 text (TM1py.Objects.Annotation.Annotation attribute),
selected (TM1py.Objects.Axis.ViewTitleSelection at- 4
tribute), 5 text (TM1py.Objects.Rules.Rules attribute), 14
Server (class in TM1py.Objects.Server), 14 tidy_cellset() (in module
ServerService (class in TM1py.Services.CellService), 26
TM1py.Services.ServerService), 39 TM1Object (class in TM1py.Objects.TM1Object), 15
session_id (TM1py.Services.RESTService.RESTService TM1py (module), 1
attribute), 37 TM1py.Exceptions (module), 4
set_local_start_time() TM1py.Exceptions.Exceptions (module), 3
(TM1py.Services.ChoreService.ChoreService TM1py.Objects (module), 16
method), 27 TM1py.Objects.Annotation (module), 4
set_time() (TM1py.Objects.ChoreStartTime.ChoreStartTime TM1py.Objects.Application (module), 5
method), 6 TM1py.Objects.Axis (module), 5
set_version() (TM1py.Services.RESTService.RESTService TM1py.Objects.Chore (module), 5
method), 37 TM1py.Objects.ChoreFrequency (module), 6
skipcheck (TM1py.Objects.Cube.Cube attribute), 7 TM1py.Objects.ChoreStartTime (module), 6
skipcheck (TM1py.Objects.Rules.Rules attribute), 14 TM1py.Objects.ChoreTask (module), 7
sort_coordinates() (in module TM1py.Objects.Cube (module), 7
TM1py.Utils.Utils), 49 TM1py.Objects.Dimension (module), 8
split_into_statements() (in module TM1py.Objects.Element (module), 8
TM1py.Utils.TIObfuscator), 45 TM1py.Objects.ElementAttribute (module), 9

62 Index
TM1py Documentation, Release 1.0.2

TM1py.Objects.Hierarchy (module), 9 update() (TM1py.Services.AnnotationService.AnnotationService


TM1py.Objects.MDXView (module), 10 method), 17
TM1py.Objects.NativeView (module), 10 update() (TM1py.Services.ChoreService.ChoreService
TM1py.Objects.Process (module), 12 method), 27
TM1py.Objects.Rules (module), 14 update() (TM1py.Services.CubeService.CubeService
TM1py.Objects.Server (module), 14 method), 29
TM1py.Objects.Subset (module), 14 update() (TM1py.Services.DimensionService.DimensionService
TM1py.Objects.TM1Object (module), 15 method), 30
TM1py.Objects.User (module), 15 update() (TM1py.Services.ElementService.ElementService
TM1py.Objects.View (module), 16 method), 31
TM1py.Services (module), 44 update() (TM1py.Services.HierarchyService.HierarchyService
TM1py.Services.AnnotationService (mod- method), 32
ule), 16 update() (TM1py.Services.ProcessService.ProcessService
TM1py.Services.ApplicationService (mod- method), 35
ule), 17 update() (TM1py.Services.SubsetService.SubsetService
TM1py.Services.CellService (module), 17 method), 41
TM1py.Services.ChoreService (module), 26 update() (TM1py.Services.ViewService.ViewService
TM1py.Services.CubeService (module), 27 method), 43
TM1py.Services.DimensionService (module), update_cellset() (TM1py.Services.CellService.CellService
29 method), 25
TM1py.Services.ElementService (module), 30 update_default_member()
TM1py.Services.HierarchyService (module), (TM1py.Services.HierarchyService.HierarchyService
32 method), 33
TM1py.Services.MonitoringService (mod- update_edge() (TM1py.Objects.Hierarchy.Hierarchy
ule), 33 method), 10
TM1py.Services.ObjectService (module), 33 update_element() (TM1py.Objects.Hierarchy.Hierarchy
TM1py.Services.ProcessService (module), 34 method), 10
TM1py.Services.RESTService (module), 36 update_static_configuration()
TM1py.Services.SecurityService (module), (TM1py.Services.ServerService.ServerService
37 method), 40
TM1py.Services.ServerService (module), 39 update_storage_dimension_order()
TM1py.Services.SubsetService (module), 40 (TM1py.Services.CubeService.CubeService
TM1py.Services.TM1Service (module), 42 method), 29
TM1py.Services.ViewService (module), 42 update_user() (TM1py.Services.SecurityService.SecurityService
TM1py.Utils (module), 49 method), 39
TM1py.Utils.MDXUtils (module), 44 User (class in TM1py.Objects.User), 15
TM1py.Utils.TIObfuscator (module), 45 user_is_active() (TM1py.Services.MonitoringService.MonitoringSer
TM1py.Utils.Utils (module), 45 method), 33
TM1pyException, 3
TM1Service (class in TM1py.Services.TM1Service), 42 V
to_xlsx() (TM1py.Objects.Application.Application valid_types (TM1py.Objects.Element.Element
method), 5 attribute), 8
translate_to_boolean() valid_types (TM1py.Objects.ElementAttribute.ElementAttribute
(TM1py.Services.RESTService.RESTService attribute), 9
static method), 37 variables (TM1py.Objects.Process.Process attribute),
type (TM1py.Objects.Subset.Subset attribute), 15 14
verify_response()
U (TM1py.Services.RESTService.RESTService
undefvals (TM1py.Objects.Cube.Cube attribute), 7 static method), 37
undefvals (TM1py.Objects.Rules.Rules attribute), 14 version (TM1py.Services.ObjectService.ObjectService
unique_name (TM1py.Objects.Dimension.Dimension attribute), 33
attribute), 8 version (TM1py.Services.RESTService.RESTService
unique_name (TM1py.Objects.Element.Element attribute), 37
attribute), 8

Index 63
TM1py Documentation, Release 1.0.2

version (TM1py.Services.TM1Service.TM1Service at-


tribute), 42
View (class in TM1py.Objects.View), 16
ViewAxisSelection (class in TM1py.Objects.Axis),
5
ViewService (class in TM1py.Services.ViewService),
42
ViewTitleSelection (class in
TM1py.Objects.Axis), 5

W
whoami (TM1py.Services.TM1Service.TM1Service at-
tribute), 42
write_value() (TM1py.Services.CellService.CellService
method), 25
write_values() (TM1py.Services.CellService.CellService
method), 25
write_values_through_cellset()
(TM1py.Services.CellService.CellService
method), 26

64 Index

You might also like