TM1py is a Python package that wraps the TM1 REST API in a simple to use library.

Overview

By wrapping the IBM Planning Analytics (TM1) REST API in a concise Python framework, TM1py facilitates Python developments for TM1.

Interacting with TM1 programmatically has never been easier.

with TM1Service(address='localhost', port=8001, user='admin', password='apple', ssl=True) as tm1:
    subset = Subset(dimension_name='Month', subset_name='Q1', elements=['Jan', 'Feb', 'Mar'])
    tm1.subsets.create(subset, private=True)

Features

TM1py offers handy features to interact with TM1 from Python, such as

  • Read data from cubes through cube views and MDX Queries
  • Write data into cubes
  • Execute processes and chores
  • Execute loose statements of TI
  • CRUD features for TM1 objects (cubes, dimensions, subsets, etc.)
  • Query and kill threads
  • Query MessageLog, TransactionLog and AuditLog
  • Generate MDX Queries from existing cube views

Requirements

  • python (3.7 or higher)
  • requests
  • requests_negotiate_sspi
  • TM1 11

Optional Requirements

  • pandas

Install

without pandas

pip install tm1py

with pandas

pip install "tm1py[pandas]"

Usage

on-premise

from TM1py.Services import TM1Service

with TM1Service(address='localhost', port=8001, user='admin', password='apple', ssl=True) as tm1:
    for chore in tm1.chores.get_all():
        chore.reschedule(hours=-1)
        tm1.chores.update(chore)

IBM cloud

with TM1Service(
        base_url='https://mycompany.planning-analytics.ibmcloud.com/tm1/api/tm1/',
        user="non_interactive_user",
        namespace="LDAP",
        password="U3lSn5QLwoQZY2",
        ssl=True,
        verify=True,
        async_requests_mode=True) as tm1:
    for chore in tm1.chores.get_all():
        chore.reschedule(hours=-1)
        tm1.chores.update(chore)

Samples: https://github.com/cubewise-code/TM1py-samples

Documentation

Detailed Installation instructions and Samples: https://github.com/cubewise-code/TM1py-samples

Issues

If you find issues, sign up in Github and open an Issue in this repository

Contribution

TM1py is an open source project. It thrives on contribution from the TM1 community. If you find a bug or feel like you can contribute please fork the repository, update the code and then create a pull request so we can merge in the changes.

Comments
  • TI vs TM1py which is a better ETL process?

    TI vs TM1py which is a better ETL process?

    Hello @MariusWirtz image

    Creation | Updation time is written in the cells. Other than time performance what other factors would you suggest to determine a better ETL process?

    question 
    opened by pal-16 36
  • TM1 Git integration

    TM1 Git integration

    I was going to start building out a GitService to incorporate the new features available in 2.07. Before I get started I wanted to make sure I wasn't duplicating work that was already underway.

    Cheers.

    question 
    opened by ghost 31
  • Issue with copying view

    Issue with copying view

    Describe what did you try to do with TM1py I am trying to copy a view and any named subsets from a Source server to a target server

    Describe what's not working the way you expect Didn't get the expected result? Describe:

    1. I expected the view to get migrated to the target server
    2. The script is copying the subsets just fine and then bombing on the view create

    Version

    • TM1py [1.6.2]
    • TM1 Server Version: [2.0.9.7]

    Additional context Script:

    from TM1py.Services import TM1Service
    from configparser import ConfigParser
    
    config = ConfigParser()
    config.read(r'config.ini')
    
    source_tm1 = TM1Service(**config['glcs-test'], password='somepassword')
    target_tm1 = TM1Service(**config['glcs'], password='somepassword')
    cube = 'plan_BudgetPlan'
    view = 'Chad'
    
    
    def copy_subs(sub_dict: dict) -> str:
        for _object in sub_dict:
            dimension = _object
            subset = sub_dict[_object]
            source_sub = source_tm1.dimensions.subsets.get(dimension_name=dimension, hierarchy_name=dimension,
                                                           subset_name=subset, private=False)
            if target_tm1.dimensions.subsets.exists(dimension_name=dimension, hierarchy_name=dimension,
                                                    subset_name=subset, private=False):
                target_tm1.dimensions.subsets.update(subset=source_sub, private=False)
            else:
                target_tm1.dimensions.subsets.create(subset=source_sub, private=False)
        return "Some string"
    
    
    source_view = source_tm1.cubes.views.get(cube_name=cube, view_name=view, private=False)
    dimensions = source_view.titles
    dimensions.extend(source_view.rows)
    dimensions.extend(source_view.columns)
    sub_list = dict()
    for dim in dimensions:
        if dim.subset.name:
            sub_list[dim.dimension_name] = dim.subset.name
    if sub_list:
        copy_subs(sub_list)
    if target_tm1.cubes.views.exists(cube_name=cube, view_name=view, private=False):
        target_tm1.cubes.views.update(view=source_view, private=False)
    else:
        target_tm1.cubes.views.create(view=source_view, private=False)
    

    Stack Trace:

    Traceback (most recent call last):
      File "C:\Users\charvey\PycharmProjects\TM1_Promote\ztemp.py", line 40, in <module>
        target_tm1.cubes.views.create(view=source_view, private=False)
      File "C:\Users\charvey\PycharmProjects\TM1_Promote\venv\lib\site-packages\TM1py\Services\ViewService.py", line 35, in create
        return self._rest.POST(url, view.body, **kwargs)
      File "C:\Users\charvey\PycharmProjects\TM1_Promote\venv\lib\site-packages\TM1py\Services\RestService.py", line 77, in wrapper
        self.verify_response(response=response)
      File "C:\Users\charvey\PycharmProjects\TM1_Promote\venv\lib\site-packages\TM1py\Services\RestService.py", line 436, in verify_response
        raise TM1pyRestException(response.text,
    TM1py.Exceptions.Exceptions.TM1pyRestException: Text: '{"error":{"code":"278","message":"Selected element was not specified on Title axis subset."}}' - Status Code: 400 - Reason: 'Bad Request' - Headers: {'Content-Length': '103', 'Connection': 'keep-alive', 'Content-Encoding': 'gzip', 'Cache-Control': 'no-cache', 'Content-Type': 'application/json; charset=utf-8', 'OData-Version': '4.0'}
    
    question 
    opened by harveyca307 25
  • Unable to install TM1py on server with no internet

    Unable to install TM1py on server with no internet

    Describe what did you try to do with TM1py I am trying to install TM1py but the server has no internet connection

    Describe what's not working the way you expect I receive an error that i am including when running the setup.py after copying the source directory to the site library folder

    Version

    • TM1py 1.3.1
    • TM1 Server Version: 11.4.00003.8

    py error

    tm1py location

    Thanks Additional context If you encounter an error, please add the error message and the stack trace

    question 
    opened by jbeanz23 25
  • Connection to IBM cloud using tm1py

    Connection to IBM cloud using tm1py

    Hi all,

    I am trying to connect our TM1 database/application called 'tm1' on our cloud environment with these code:

    from TM1py import TM1Service with TM1Service( base_url=https://cwd.planning-analytics.ibmcloud.com/tm1/api/tm1/, namespace = LDAP, user=user, password=password, ssl=True, verify=True, async_requests_mode=True) as tm1: print(tm1.server.get_product_version())

    Unfortunately i am getting this error message: image

    That problem is solved. I had to " " the base url, namespace, user and password.

    But now, I am getting this error message: image

    I absolutely do not know what hat means. :-(

    Every help is very much appreciated.

    Thanks in advance.

    question 
    opened by Andy-Hofelmeyer 24
  • write_values_through_cellset method

    write_values_through_cellset method

    I am using write_values_through_cellset to move data from a source TM1 server to a target. I am noticing inconsistencies in the data being moved. I am testing with 2 MDX statements. "MDX1" seems to work but not "MDX2". The code runs without error using either MDX statement. Here is my code:

    
    import configparser
    
    from TM1py.Services import TM1Service
    
    config = configparser.ConfigParser()
    config.read(r'..\config.ini')
    
    with TM1Service(**config['tm1server01']) as tm1source:
        with TM1Service(**config['tm1server02']) as tm1target:
    
            mdx1 = """
                SELECT non empty {Descendants([plan_version].[plan_version].members,100,LEAVES)} *
                {[plan_business_unit].[plan_business_unit].[10120]} *
                {[plan_department].[plan_department].[415] } *
                {[plan_chart_of_accounts].[plan_chart_of_accounts].[64055] } *
                {[plan_exchange_rates].[plan_exchange_rates].[local] } *
                {[plan_lines].[plan_lines].[line 1] }
                on 0, 
                       {[plan_time].[plan_time].[Dec-2004]} on 1 
                       FROM [plan_BudgetPlanLineItem]
                """
    
            mdx2 = """
                       SELECT non empty {[plan_version].[plan_version].[FY 2004 Budget]} *
                       {Descendants([plan_business_unit].[plan_business_unit].members,100,LEAVES)} *
                       {Descendants([plan_department].[plan_department].members,100,LEAVES) } *
                       {Descendants([plan_chart_of_accounts]. 
                       [plan_chart_of_accounts].members,100,LEAVES) } *
                       {[plan_exchange_rates].[plan_exchange_rates].[local] } *
                       {Descendants([plan_lines].[plan_lines].members,100,LEAVES) }
                       on 0, 
                       {[plan_time].[plan_time].[Dec-2004]} on 1 
                       FROM [plan_BudgetPlanLineItem]
                       """
    
            data = tm1source.data.execute_mdx(mdx1, cell_properties=['Value'])
    
            values = [cell['Value'] for cell in data.values()]
    
            tm1target.data.write_values_through_cellset(mdx1, values)
    
           # this for loop returns 1 row when MDX1 is used and that data does move to
           # the target server. Using MDX2 returns 13 rows but the values listed do not appear
           # in the target server
            for x in data.values():
                print(x['Value'])
    
    

    Am I missing something? Thank you for your help!

    question 
    opened by jimnaff 23
  • Cannot connect to TM1 with Intgreated mode=5 with SSO

    Cannot connect to TM1 with Intgreated mode=5 with SSO

    I am trying to connect to TM1. It works when i have integrated mode=1.

    But when I am trying with mode 5it says " line 15, in init self._tm1_rest = RestService(**kwargs) line 185, in init self._start_session( ", line 335, in _start_session token = self._build_authorization_token( , line 447, in _build_authorization_token return RestService._build_authorization_token_cam(user, password, namespace, gateway, verify) , line 468, in _build_authorization_token_cam raise RuntimeError( RuntimeError: Failed to authenticate through CAM. HTTP response does not contain 'cam_passport' cookie

    bug 
    opened by aagrawal12 21
  • Subset used in MDX query

    Subset used in MDX query

    Describe what did you try to do with TM1py Does anyone know if you can assign a subset to the rows in an MDX query? I am trying to use a subset I created on a new MDX pull but am not sure how to do this. Also, does anyone know if you can use the roll-up of the subset in the MDX query (this would be preferred)?

    Describe what's not working the way you expect Didn't get the expected result? Describe: I have a script creating a subset by subtracting elements that have data in 1 or both of 2 cubes from all elements in the dimension, leaving those with no data, code is below. I want to then create a new MDX query against just this subset, or even the rolled-up subset so I can drill down to all accounts. I cannot do this initially because I run out of memory.

    df2 = tm1.cubes.cells.execute_mdx_dataframe(mdx2)
    for _, row in df2.iterrows():
        material = row['Material EMEA']
        used_assumption_materials.add(material)
    
    unused_materials = set(all_materials) - used_staging_materials - used_assumption_materials
    
    dimension_name = "Material EMEA"
    subset_name = "Unused Materials EMEA"
    elements = set(unused_materials)
    
    s = Subset(dimension_name=dimension_name, subset_name=subset_name, alias='', elements=elements)
    tm1.dimensions.subsets.create(subset=s, private=False)
    

    Preferably in the next query (below) would like to use the roll-up of the subset created for the Materials and then just drill down on all N level accounts. I am using all the accounts that had data when I checked this because i don't know how to use a roll-up or the subset. I want to remove the elements from the first set that have data at N level accounts that gets reversed. and total to 0 at Total Account.

    mdx = """
       SELECT 
       NON EMPTY {{TM1FILTERBYLEVEL( TM1SUBSETALL( [Material EMEA] ), 0)}} *
       {{[GL Account].[40100000],[GL Account].[40101500],[GL Account].[50156000],
       [GL Account].[40200000],[GL Account].[40120000],[GL Account].[40850000],[GL Account].[40880000],
       [GL Account].[40160000],[GL Account].[50100000],[GL Account].[50199300],[GL Account].[50200000],
       [GL Account].[50120000],[GL Account].[50810000],[GL Account].[50860000],[GL Account].[50880000]}} ON ROWS,
    

    Version

    • TM1py - 1.4.1
    • TM1 Server Version: 2.0.9.1

    Additional context Thanks

    question 
    opened by jbeanz23 21
  • Unauthorized error while accessing tm1 cube data with tm1py

    Unauthorized error while accessing tm1 cube data with tm1py

    I am getting below error while accessing TM1 cube data using TM1py. Intigrated security mode:5 While accessing it is showing connection established and returning Application server name.

    "TM1py.Exceptions.Exceptions.TM1pyException: Text: Status Code: 401 Reason: Unauthorized".

    question 
    opened by srinivas1703 21
  • tm1py and powerbi getting started ?

    tm1py and powerbi getting started ?

    Hi - Tm1py 1.5 looks like a fantastic release, very keen to explore the new features that support PowerBI integration. Do you have an example that I can use to get started with maybe ?. KR Nick

    question 
    opened by watersnick 20
  • Python code not sending the parameters to the process it triggers when the code is triggered by another process

    Python code not sending the parameters to the process it triggers when the code is triggered by another process

    I have a Python code that triggers a TM1 process. When I run the Python code from PyCharm and Command Prompt, the code works as intended. However, when I trigger the Python code from an another process, the process that is triggered by the Python code does not receive the parameters that are sent by the code. I don't get any kind of error. I am not sure what is the problem.

    question 
    opened by elcinsayin 18
  • Sandbox updates

    Sandbox updates

    Added load/unload sandbox functions. Also added Active, Loaded, Queued properties to sandbox object. I did not change the sandbox body, so all existing tests should still pass. I've taken a stab at adding tests for the new functions and properties.

    opened by adscheevel 0
  • Run exe using TI process

    Run exe using TI process

    Hello everyone, I Tried to create a public view using TI process containing tm1py code in exe file Here is the script i used: TI Code: cmd = '"\tm1-stg.hsbc.com\TI Files\AXP_IM\Dynamic\main.exe"'; port = '6001'; sCode = '%cmd% %port%'; ExecuteCommand(Expand(sCode),1);

    Here is what's not working the way I expect Didn't get the expected result? Describe:

    1. The TI is completed successfully but view is not created.
    2. Same exe when ran at my local machine directly is working fine.

    Version

    • TM1py [1.9.1]

    Additional context Does it takes admin account then only it can create the private view ? Can someone please guide me..

    question 
    opened by Rvee93 3
  • Federated authentication for PAoC

    Federated authentication for PAoC

    TM1py should allow federated authentication for PA in the IBM cloud.

    https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=information-federated-authentication

    enhancement 
    opened by MariusWirtz 0
  • Take full advantage of asynchronous request execution

    Take full advantage of asynchronous request execution

    There is currently no way to take full advantage of asynchronous request execution (asnyc_requests_mode).

    It would be nice if TM1py could return the job-id to the calling function. This way python scripts could easily do stuff in parallel while polling the operations in TM1 to see if they are finished yet.

    Reference: https://gist.github.com/rclapp/2d6d8d389b99838d6e0fec18642e658f

    enhancement 
    opened by MariusWirtz 0
  • `execute_mdx_dataframe` to support multi axes MDX queries

    `execute_mdx_dataframe` to support multi axes MDX queries

    The execute_mdx_dataframe function doesn't work with multi-axes MDX queries. Only the first two axes are considered in the resulting data frame. See below. This needs to be addressed.

    from TM1py import TM1Service
    
    with TM1Service(base_url="https://localhost:12354", user="admin", password="apple") as tm1:
        mdx = """
        SELECT
        Tm1FilterByLevel({TM1SubsetAll([d3])},0) on 0,
        Tm1FilterByLevel({TM1SubsetAll([d4])},0) on 1,
        Tm1FilterByLevel({TM1SubsetAll([d5])},0) on 2
        FROM [c4]
        """
    
        df = tm1.cells.execute_mdx_dataframe(mdx)
    
        print(df.head().to_markdown())
    
    

    | | d4 | d3 | Value | |---:|:-----|:-----|--------:| | 0 | e01 | e01 | 8 | | 1 | e01 | e02 | 8 | | 2 | e01 | e03 | 8 | | 3 | e01 | e04 | 8 | | 4 | e01 | e05 | 8 |

    Why not just stack selections on axis 1 or 0 ? When using tuples in the selections, multi-axes selections perform better than stacked selections

    opened by MariusWirtz 0
  • Drop `MAX_STATEMENTS` in `write` `use_ti` logic in versions > 11.8.15

    Drop `MAX_STATEMENTS` in `write` `use_ti` logic in versions > 11.8.15

    I was just informed that TM1 release 11.8.15 will not have a limitation on the number of statements that a TI process can have.

    We can increase the MAX_STATEMENTS logic in the write_through_unbound_process function. This should lead to better performance as the CellPut statements won't need to be broken down into n sequentially executed processes.

    enhancement 
    opened by MariusWirtz 2
Releases(1.10.1)
  • 1.10.1(Oct 24, 2022)

    Fixes issue #819 that was introduced with release 1.10

    What's Changed

    • Add argument skip_sandbox_dimension to execute_mdx by @cubewise-gng in https://github.com/cubewise-code/tm1py/pull/812
    • Add option to pass element selection as iterator in get_value function by @tobiaskapser in https://github.com/cubewise-code/tm1py/pull/814
    • Fix verify_version function by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/820

    New Contributors

    • @cubewise-gng made their first contribution in https://github.com/cubewise-code/tm1py/pull/812

    Full Changelog: https://github.com/cubewise-code/tm1py/compare/1.10.0...1.10.1

    Source code(tar.gz)
    Source code(zip)
  • 1.10.0(Oct 10, 2022)

    Highlights

    Performance improvements on all major TM1 I/O functions.

    from TM1py import TM1Service
    
    with TM1Service(address="", port=12354, ssl=True, user="admin", password="") as tm1:
    
        df = tm1.cells.execute_view_dataframe(cube_name="Sales", view_name="Default", private=False)
    

    | | Time | State | SalesMeasure | Value | |----:|-------:|:--------|:---------------|------------:| | 0 | 202001 | CA | Gross Margin | 13924.8 | | 1 | 202001 | CA | Revenue | 41330.4 | | 2 | 202001 | CA | COGS | 27405.6 |

    from TM1py import TM1Service
    
    with TM1Service(base_url="https://localhost:12354", user="admin", password="") as tm1:
    
        cells = {
            ('Belgium', 'Actual', '2022', 'Apr', 'Revenue'): 10_000,
            ('Belgium', 'Actual', '2022', 'May', 'Revenue'): 15_000,
            ...
            ('Belgium', 'Actual', '2022', 'Jun', 'Revenue'): 20_000,
            ('Belgium', 'Actual', '2022', 'Apr', 'Revenue'): 45_000,
        }
    
        tm1.cells.write_async(cube_name="Sales", cells=cells, slice_size=32_000, max_workers=4,
                              measure_dimension_elements={'Revenue': 'Numeric'})
    
    

    Full support for TM1's git deployment functionality. Including the TM1Project and deployment definitions.

    
    with TM1Service(address="", port=11247, ssl=True, user="admin", password="") as tm1:
    
        project = TM1Project(name="Project Definition")
    
        dev_deployment = TM1ProjectDeployment(
            deployment_name="Dev",
            settings={"ServerName": "dev"})
    
        dev_deployment.add_task(TM1ProjectTask(
            task_name="Security Refresh",
            process="Bedrock.Security.Refresh"))
    
        dev_deployment.include_all_attribute_dimensions(tm1)
        dev_deployment.add_ignore(object_class="Cubes", object_name="*")
    
        project.add_deployment(deployment=dev_deployment)
    
        tm1.git.tm1project_put(project)
    

    New and more efficient ways to query and control elements and hierarchies.

    from TM1py import TM1Service
    
    with TM1Service(base_url="https://localhost:12354", user="admin", password="") as tm1:
    
        # break edge as one tiny atomic operation
        tm1.elements.remove_edge(dimension_name="Region", hierarchy_name="Region", parent="EU", component="UK")
    
        # add new edge as one tiny atomic operation
        tm1.elements.add_edges(dimension_name="Region", hierarchy_name="Region", edges={("Other", "UK"): 1})
    
    from TM1py import TM1Service
    
    with TM1Service(base_url="https://localhost:12354", user="admin", password="") as tm1:
    
        is_parent = tm1.elements.element_is_parent(dimension_name="Region", hierarchy_name="Region", parent_name="Other",
                                                   element_name="UK")
    
        is_ancestor = tm1.elements.element_is_ancestor(dimension_name="Region", hierarchy_name="Region",
                                                       element_name="Other", ancestor_name="UK")
    

    Heaps of miscellaneous features, optimizations and improvements that make your life easier when doing TM1 with Python.

    from TM1py import TM1Service
    
    with TM1Service(base_url="https://localhost:12354", user="admin", password="") as tm1:
    
        process_names = tm1.processes.search_string_in_code(search_string="Sunrise", skip_control_processes=True)
    
    from TM1py import TM1Service
    
    with TM1Service(base_url="https://localhost:12354", user="admin", password="apple") as tm1:
    
        tm1.cubes.cube_save_data("Sales")
    
    

    New Features and Improvements

    • Fix in set_time function in ChoreStartTime class to allow 0 values by @samuelko123 in https://github.com/cubewise-code/tm1py/pull/686
    • Add substitute_title function to MDXView by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/687
    • Add include_headers argument to extract_cellset_csv function by to @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/689
    • Add remove_edge function to ElementService to break individual parent-child relationship in one operation by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/693
    • Fix bug to allow dimension creation from JSON file by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/698
    • Improve performance of critical build_cellset_from_pandas_dataframe function by @Kevin-Dekker in https://github.com/cubewise-code/tm1py/pull/695
    • Add get_parents function to ElementService. Allows retrieval of all parents for an element by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/699
    • Fix doubled double quotes issue in element names by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/704
    • Explicitly add elements to leaves hierarchy so solve #702 by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/703
    • Handle duplicates in write_dataframe appropriately by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/708 & https://github.com/cubewise-code/tm1py/pull/712
    • Accept str for rules update on Cube object by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/710
    • New search function to find substrings in Rules or Processes (e.g., search_string_in_code) by @adscheevel in https://github.com/cubewise-code/tm1py/pull/723
    • Fix write failure for element names with : by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/724
    • Add get_element_principal_name function by @MaaYuu in https://github.com/cubewise-code/tm1py/pull/731
    • Add get_ancestors, get_descendants functions on Hierarchy by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/732
    • Read 'NA' element name as a string instead of pandas NaN by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/739
    • Align float numbers intelligently when writing through unbound processes, to avoid "Number too big" TI errors during writeback, by @pbuncik in https://github.com/cubewise-code/tm1py/pull/749
    • Add functions to find views that contain a specified subset by @adscheevel in https://github.com/cubewise-code/tm1py/pull/751
    • Improve write_async performance by exposing measure_dimension_elements to write_async function by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/753
    • Introduce get_descendant_edges function in Hierarchy class by @skriptmeister42 in https://github.com/cubewise-code/tm1py/pull/760
    • Fix the update function in ApplicationService to use the update operation instead of the delete and recreate approach, to avoid breaking existing references of the application by @jrobinsonLOR in https://github.com/cubewise-code/tm1py/pull/762
    • Implement element_is_parent and element_is_ancestor by @rclapp in https://github.com/cubewise-code/tm1py/pull/767 and https://github.com/cubewise-code/tm1py/pull/771
    • Allow queries with selection on more than 3 axes in the execute_mdx function by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/777
    • Add support for trace_cell_calculation, trace_cell_feeders, and check_cell_feeders by @rclapp in https://github.com/cubewise-code/tm1py/pull/780
    • Add function create_many in AnnotationService to create many annotations in one operation by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/785
    • Add new element functions like get_consolidated_elements, get_parents_of_all_elements by @adscheevel in https://github.com/cubewise-code/tm1py/pull/792
    • Adjust TM1py to changes in mdxpy 0.4 by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/793
    • Handle TM1Project in the GitService by @nicolasbisurgi in https://github.com/cubewise-code/tm1py/pull/775 and https://github.com/cubewise-code/tm1py/pull/796
    • Refactor Breakpoints and introduce new debugging functionality by @adscheevel in https://github.com/cubewise-code/tm1py/pull/791
    • Allow alternative separators for elements in get_value and other functions by @tobiaskapser in https://github.com/cubewise-code/tm1py/pull/801 and https://github.com/cubewise-code/tm1py/pull/805
    • Use 100k max statements in write function with use_ti=True by @MariusWirtz in https://github.com/cubewise-code/tm1py/pull/808
    • Enable TCP keepalive option for long run requests by @macsir in https://github.com/cubewise-code/tm1py/pull/807
    • Additional features in ServerService : CubeSaveData and DeleteAllPersistentFeeders by @Mr-SabyasachiBose in https://github.com/cubewise-code/tm1py/pull/810

    New Contributors

    • @samuelko123 made their first contribution in https://github.com/cubewise-code/tm1py/pull/686
    • @Kevin-Dekker made their first contribution in https://github.com/cubewise-code/tm1py/pull/695
    • @MaaYuu made their first contribution in https://github.com/cubewise-code/tm1py/pull/731
    • @pbuncik made their first contribution in https://github.com/cubewise-code/tm1py/pull/749
    • @skriptmeister42 made their first contribution in https://github.com/cubewise-code/tm1py/pull/760
    • @jrobinsonLOR made their first contribution in https://github.com/cubewise-code/tm1py/pull/762
    • @nicolasbisurgi made their first contribution in https://github.com/cubewise-code/tm1py/pull/775
    • @tobiaskapser made their first contribution in https://github.com/cubewise-code/tm1py/pull/801
    • @Mr-SabyasachiBose made their first contribution in https://github.com/cubewise-code/tm1py/pull/810

    How to upgrade TM1py

    To upgrade TM1py, just use the following command:

    pip install TM1py --upgrade
    

    Full Changelog: https://github.com/cubewise-code/tm1py/compare/1.9.0...1.10.0

    Source code(tar.gz)
    Source code(zip)
  • 1.9.0(Feb 7, 2022)

    Highlights

    New optional use_iterative_json parameter in execute_mdx_dataframe/execute_view_dataframe functions https://github.com/cubewise-code/tm1py/pull/646, https://github.com/cubewise-code/tm1py/pull/612

    This new feature allows TM1py to use iterative JSON parsing.

    When use_iterative_json is True TM1py requires a significantly smaller memory footprint (down to ~ 20% of the original value) at an almost negligible cost of performance (single percentage digit):

    from TM1py import TM1Service
    
    with TM1Service(
            base_url="https://localhost:12354",
            user="admin",
            password="apple") as tm1:
        
        df = tm1.cells.execute_view_dataframe(cube_name="Sales", view_name="Very Large View", private=False,
                                              use_iterative_json=True)
    
    

    This is a handy feature when dealing with large or very large data volumes (1M to 10M cells) in an environment with limited RAM.

    New skip_non_updateable argument in write/write_dataframe functions https://github.com/cubewise-code/tm1py/pull/657

    This optional argument to the write/write_dataframe functions asks TM1py to filter out cells that can not be updated before attempting to write. If not used, TM1py will fail with an error when attempting to write to rule-derived or consolidated cells.

    from TM1py import TM1Service
    
    with TM1Service(
            base_url="https://localhost:12354",
            user="admin",
            password="apple") as tm1:
    
        cells = {
            ('Belgium', 'Revenue', '2022', 'Apr', 'Revenue'): 10_000,
            ('Belgium', 'Revenue', '2022', 'May', 'Revenue'): 15_000,
            ('Belgium', 'Revenue', '2022', 'Jun', 'Revenue'): 20_000,
            ('Belgium', 'Revenue', '2022', 'Q1', 'Revenue'): 45_000,
        }
    
        tm1.cells.write("Sales", cells, skip_non_updateable=True)
    

    This is a useful feature, as it saves the TM1py user from verifying the validity of the cell updates yourself when not working with flawless data sources. Only errors w.r.t. updatability are suppressed! Attempts, for instance, to write to not existing elements will still raise errors.

    New search functions to search through cubes, processes, and chores #660, #663, #665

    from TM1py import TM1Service
    
    with TM1Service(
            base_url="https://localhost:12354",
            user="admin",
            password="apple") as tm1:
    
        processes = tm1.processes.search_string_in_code(search_string="Sales")
    
    
    from TM1py import TM1Service
    
    with TM1Service(
            base_url="https://localhost:12354",
            user="admin",
            password="apple") as tm1:
    
        processes = tm1.processes.search_string_in_name(name_contains="Sales")
    
    from TM1py import TM1Service
    
    with TM1Service(
            base_url="https://localhost:12354",
            user="admin",
            password="apple") as tm1:
    
        cubes = tm1.cubes.search_for_dimension(dimension_name="Product", skip_control_cubes=True)
    
    

    New Features

    • add write to_message_log_function #621
    • allow skip_zeros in execute_mdx_values function #659
    • use python built-in csv module to create csv strings in execute_mdx_csv function #678
    • new rename function in ApplicationService #682
    • support compact_json in some execute_mdx_ functions #650

    Improvements and Bugfixes

    • get_last_message_from_processerrorlog to return text ac0d72f2318077b26134c7e9dc02f3833d7d6391
    • raise exception when session creation fails a42753efd089f8179213596f0ce38001d53822c0
    • don't raise error if cellset is already deleted 3246391470a81215a5d47ec24a3a2d4e85529f64
    • improve execute_set_mdx function 61fe2ea8f06caf55ecb9f34025425e86f7ebacde
    • add update_or_create function for document from file 7f94f712c0377391c069f817081483dca7351ecc
    • drop obsolete arguments in TM1Service constructor #652
    • support attribute type change #664
    • fix get_values function issue to work with alternate hierarchies seamlessly #680
    • improve handling of alternate hierarchies in write function #679
    • optional measure_dimension_elementsdictionary argument to write and write_dataframe function to improve performance b21ac47ce8ee9c990aae269e5594c1a342cd0021

    Acknowledgments

    Big thanks to @rkvinoth, @jrobinsonAG, @gbryant-dev, @raeldor, @adscheevel, @jordanjeremy for contributing code to this release, and many others for reporting bugs and requesting new features.

    How to upgrade TM1py

    To upgrade TM1py, just use the following command:

    pip install TM1py --upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 1.8.0(Sep 29, 2021)

    Highlights

    • Support MDX properties in execute_mdx_dataframe. This allows to query data and attribute data with a single query into one shared data frame.
    from TM1py import TM1Service
    
    with TM1Service(address="", port=12354, user="admin", password="apple", ssl=True) as tm1:
        mdx = """
        SELECT
        {Tm1SubsetAll([Region])} PROPERTIES [Region].[Currency] ON COLUMNS,
        {Tm1SubsetAll([Year])} ON ROWS
        FROM [Sales]
        """
    
        data = tm1.cells.execute_mdx_dataframe(mdx, include_attributes=True)
    

    | | Year | Region | Currency | Value | |---:|:----------|:------|:----------------------|--------:| | 0 | 2021 | US | USD | 18 | | 1 | 2021 | UK | GBP | 4 |

    • write_async and write_async_dataframe functions with max_workers argument. This is essentially an easy way to speed up TM1 writeback through parallelization.
    from TM1py import TM1Service
    
    with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
        cells = {
            ('e1', 'e1'): 1,
            ('e1', 'e2'): 2,
            ('e2', 'e1'): 3,
            ('e2', 'e2'): 4,
            ('e3', 'e1'): 5,
            ('e3', 'e2'): 6,
        }
    
        tm1.cells.write_async(cube_name="c1", cells=cells, slice_size=1, max_workers=6)
    
    
    from pandas import DataFrame
    
    from TM1py import TM1Service
    
    with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
        data = DataFrame({
            'd1': ['e1', 'e1', 'e2', 'e2', 'e3', 'e3'],
            'd2': ['e1', 'e2', 'e1', 'e2', 'e1', 'e2'],
            'value': [1, 2, 3, 4, 5, 6],
        })
    
        tm1.cells.write_dataframe_async(cube_name="c1", data=data, slice_size_of_dataframe=1, max_workers=6)
    
    
    • TM1 git support #447 TM1py now allows you to manage the TM1 git repository. You can manage the TM1 database with git and TM1py.

    • New authentication mode based on cam_passport. Can be used from Jupyter within Cognos Analytics.

    from ca_data_connector.ca_lib import OnPremSession
    
    session = OnPremSession()
    session.initialize()
    passport = session.get_cookies()['cam_passport']
    
    with TM1Service(address=address, port=port, ssl=ssl, cam_passport=passport) as tm1:
        print(tm1.server.get_server_name())
    

    New Features

    • AuditLog queries 3771dad
    • Changes to tm1.power_bi.execute_mdx function to provide data to PBI in the most friendly way #476
    • Improvement on PowerBI dimension retrieval function to fetch attribute for a parent instead of parent element name #478
    • Support MDX PROPERTIES in execute_mdx_dataframe #470
    • Introduce a new cancel_at_timeout argument to abort TM1 operation once the timeout is reached
    • Support process debugging a83da11
    • New arguments on execute_mdx, execute_view: skip_cell_properties, element_unique_names to control shape of response dictionary f751edf, 6d9e520
    • TM1 git support #447
    • New write_dataframe_async function 94081eb
    • New write_async function 3969c1d
    • Create, read, update, delete servers on admin host #296
    • New re_authenticate function in TM1Service 2028d3d
    • Better delta log requests aeed032
    • Allow login with cam_passport f070c06

    Fixes

    • Never attempt to delete leaves hierarchy a0aa152
    • Make install with pandas work with zsh c458e40
    • Fix encoding of ui-data property 6438309
    • Fix deactivate / activate chore #515
    • Accept float as timeout 2d0c555
    • Fix is_admin property in User class d9ed1b2
    • Fix documentation on readthedocs
    • Remove linebreaks when writing with ti #568
    • Include empty strings suppression in extract_cellset_raw 01eb4a7
    • Allow parameters on unbound processes 144db38
    • Improve kwargs delegation through call stack ee70f54
    • Allow WITH MEMBERS combined with include_attributes=True in execute_mdx_dataframe function #593
    • Allow WITH MEMBERS combined with display_attribute=True in execute_mdx_dataframe_shaped function #593
    • Skip sandbox dimension in cubes.get #595

    Acknowledgments

    Big thanks to @lapstue, @kaleming, @beckyconning, @macsir, @jrobinsonAG, @tomasfelcman, @cwffonseca for contributing code to this release, and many others for reporting bugs and requesting features.

    How to upgrade TM1py

    To upgrade TM1py, just use the following command:

    pip install TM1py --upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 1.6.0(Jan 22, 2021)

    Highlights

    • support for IntegratedSecurityMode3
    tm1 = TM1Service(address=servername, port=instanceport, ssl=True, integrated_login=True)
    
    • faster write function
    with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
        cells = dict()
        cells["e1", "e1"] = 1
        cells["e2", "e2"] = 2
    
        tm1.cells.write("c1", cells, use_ti=True)
    
    
    • new write_dataframe function https://github.com/cubewise-code/tm1py/commit/82a39bd1cbe1861706430caa469d7c2b97c14dda
    with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
        df = pd.DataFrame({
            'd1': ['e1', 'e2'],
            'd2': ['e1', 'e2'],
            'Value': [1, 2]})
    
        tm1.cells.write_dataframe('c1', df)
    
    • support for sandboxes
    with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
        sandbox = Sandbox(name="My Sandbox")
        tm1.sandboxes.create(sandbox)
    
    with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
        cube_name = 'c1'
        cells = {
            ("e1", "e1"): 1,
            ("e2", "e2"): 2
        }
        tm1.cells.write(cube_name, cells, sandbox_name="My Sandbox")
    
    with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple") as tm1:
        mdx = """
        SELECT
        {[d1].[e1], [d1].[e2]} ON ROWS,
        {[d2].[e1], [d2].[e2]} ON COLUMNS
        FROM [c1]
        """
        df = tm1.cells.execute_mdx_dataframe(mdx, sandbox_name="My Sandbox")
    
    • impersonation #353
    with TM1Service(address="", port=12354, ssl=True, user="admin", password="apple", impersonate="Marius") as tm1:
        print(tm1.whoami)
    

    New Features

    • new query options on filter_message_log function: level, msg_contains https://github.com/cubewise-code/tm1py/commit/e9c27150e7fd82f8f178d1709e27909b0b43c2f3
    • new direct functions to add elements, edges or element attributes quickly: add_elements, add_edges, add_element_attributes
    • new security functions: get_read_only_users, get_custom_security_groups, update_user_password #393
    • functions to start and stop performance monitor: start_performance_monitor, stop_performance_monitor
    • new cube_lock, cube_unlock functions https://github.com/cubewise-code/tm1py/commit/8ea00963227056b7996d4664ce0ed6f46d1b45f4
    • new remove_edges_under_consolidation function https://github.com/cubewise-code/tm1py/commit/e5d287652954f70cc3c7409f53dcd32b26de3f86
    • new get_elements_by_wildcard function https://github.com/cubewise-code/tm1py/commit/e4837dca03e38095ec2fef8ce8e347c9465838b6
    • add remove_all_elements, remove_all_edges function to hierarchy class
    • optional increment argument in write function
    • Add add_component function to Hierarchy class
    • support for changesets in write operations #454

    Fixes

    • improved test suite #301
    • fix get_number_of_elements function
    • fix get_members_under_consolidation #381
    • make get_attribute_of_elements work with numeric attributes https://github.com/cubewise-code/tm1py/commit/39d61fed29c84df5edd14e7b8f893da03bb6871e
    • avoid execute_dataframe method to fail over 0 cell https://github.com/cubewise-code/tm1py/commit/74509111648f141cea245f5c5cd3af58aa02f472
    • implement __sub__ function in CaseAndSpaceInsensitiveSet https://github.com/cubewise-code/tm1py/commit/8c807e7ea05dc4b3f965d3d0125c79495b96b994
    • issue in get_last_data_update function https://github.com/cubewise-code/tm1py/commit/9bc898e6c0c6a8510c8da1729dda978e47fa1279
    • Fix single-axis selection issue in execute_mdx #416
    • work around TM1 REST issue with RuleDerived cell property https://github.com/cubewise-code/tm1py/commit/b5d4bd87cd37aabcc6f205c736bc1ab4267d82e7
    • Fix chore reschedule issue cubewise-code/tm1py-samples#82

    Compatibility Notes

    • requires Python 3.7 or higher
    • execute_mdx_values now returns a list object instead of a generator
    • the MDXUtils module has been removed. Use mdxpy instead
    • write_values now returns the changeset_id instead of a response object

    Acknowledgments

    Big thanks to @rkvinoth, @scrambldchannel, @andreyea, @adscheevel, @rclapp, @wimgielis for contributing code to this release, and many others for reporting bugs and requesting features.

    How to upgrade TM1py

    To upgrade TM1py, just use the following command:

    pip install TM1py --upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 1.5.0(Aug 5, 2020)

    Highlights

    • Functions to pull TM1 data into PowerBI in a convenient shape. Allows building dashboards in PowerBI Desktop with refreshable TM1 data.

    pbi2

    The execute_mdx and execute_view functions retrieve data from a cube.

    with TM1Service(address="localhost", port=12354, user="admin", password="apple", ssl=True) as tm1:
        data = tm1.power_bi.execute_view(cube_name="Sales", view_name="PowerBI", private=False)
    

    | | Time | Industry | Executive | Customer | Business Unit | Product | State | Gross Margin | Revenue | COGS | |----:|-------:|:-----------------|:---------------|-----------:|----------------:|----------:|:--------|---------------:|-----------:|----------:| | 0 | 201308 | CPG | Andrew Ma | 10008 | 49 | 30 | TX | -5048.78 | nan | 5048.78 | | 1 | 201308 | CPG | Andrew Ma | 10017 | 49 | 30 | NY | -5821.12 | nan | 5821.12 | | 2 | 201308 | Energy | Valery Ushakov | 10035 | 31 | 50 | OH | -60384.4 | nan | 60384.4 | | 3 | 201308 | Energy | Carlos Grilo | 10026 | 48 | 20 | FL | -24880 | nan | 24880 |

    The get_member_properties function retrieves a slice of a dimension.

    with TM1Service(address="localhost", port=12354, user="admin", password="apple", ssl=True) as tm1:
    
        customers = tm1.power_bi.get_member_properties(
            dimension_name="Customer",
            hierarchy_name="Customer",
            member_selection="{Tm1SubsetAll([Customer])}",
            skip_consolidations=True,
            attributes=["State", "City"],
            skip_parents=False)
    

    | | Customer | Type | State | City | level000 | |----:|:-----------|:--------|:--------|:-------------------------|:---------------| | 0 | 1023 | Numeric | TX | Irving | Total Customer | | 1 | 10000 | Numeric | IL | Chicago | Total Customer | | 2 | 10001 | Numeric | IL | Westchester | Total Customer | | 3 | 10002 | Numeric | TX | Plano | Total Customer | | 4 | 10003 | Numeric | TX | Fort Worth | Total Customer |

    • New clear method to efficiently zero out a slice of a cube, without need to write an MDX query or create a cube view.
    with TM1Service(address="localhost", port=12354, user="admin", password="apple", ssl=True) as tm1:
    
        tm1.cells.clear(cube="Sales", state="{[State].[CA]}", time="{[Time].[2020].Children}")
    

    clear

    • Python Type Hints are now available on all functions and arguments. This enables autocompletion on all TM1py objects and makes working with TM1py way more friendly.

    type_hints2

    • New async_requests_mode to avoid 60s timeout when using TM1py with the IBM cloud #241
    with TM1Service(
            base_url='https://hostname.planning-analytics.ibmcloud.com/tm1/api/tm1_database_name/',
            user="user",
            namespace="LDAP",
            password="xxxx",
            ssl=True,
            verify=True,
            async_requests_mode=True) as tm1:
    
        print(tm1.server.get_product_version())
    
    • Added functions to MonitoringService to clear a TM1 instance from all user traffic
      • cancel_all_threads
      • close_all_sessions
      • disconnect_all_users

    New Features

    • New function execute_set_mdx in ElementService allows to execute MDX set expressions. #205
    • Add add_edges method to HierarchieService
    • Support execution of unbound TI processes #220
    • Added update_or_create methods to all services
    • Added plain clear_with_mdx method to CellService
    • Cube dimension re-order function update_storage_dimension_order now returns the percent change in memory footprint
    • Added get_element_names method to SubsetService to retrieve element names from static or dynamic subsets
    • Added user_exists, group_exists function to SecurityService
    • Improved performance in build_cellset_from_pandas_dataframe function
    • Add skip argument to all execute_view_, execute_mdx_ functions
    • New make_static function in SubsetService #262
    • Allow filtering of messagelog and transactionlog with since and until timestamps #268
    • Add skip_zeros, skip_consolidated, skip_rule_derived arguments to all execute_mdx and execute_view functions #273
    • New simplified function in ElementService to retrieve elements with one attribute as dictionary: get_attribute_of_elements
    • New function execute_mdx_elements_value_dict allows to retrieve data in dictionary with comma seperated element names as the key
    • New function clear_spread in CellService allows to execute a clear spread based on list unique element names. #207
    • Support individual timeout on function call #117

    Bug Fixes

    • Fix timeout type issue #217
    • Fix redundant calls in dimension update and create methods #229
    • New improved format_url method to properly encode special characters in TM1 object names #212
    • Add type and enabled as properties to User class
    • Fix issue in dst_chore_time
    • Fix issue in extract_cellset_dataframe
    • Replace unofficial /Content REST API calls with official API calls #273
    • Fixcheck_rules function to behave in line with compile_process function #277
    • Encode % properly in object names #285

    Compatibility Notes

    By default, pandas will no longer be installed when installing TM1py with pip. #214

    If you want to install tm1py with pandas, run:

    pip install tm1py[pandas]
    

    If a function requires pandas, but it isn't installed, TM1py will throw an ImportError:

    ImportError: Function 'get_member_properties' requires pandas
    

    The MDXUtils module has been deprecated. It still works but it throws a warning. It will be removed in the next major release of TM1py. Please use MDXpy instead.

    Acknowledgments

    Big thanks to @rkvinoth, @scrambldchannel, @rclapp, @ykud, @zPat for contributing code to this release, and many others for reporting bugs and requesting features.

    How to upgrade TM1py

    To upgrade TM1py, just use the following command:

    pip install TM1py --upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 1.4.1(Jan 2, 2020)

    New Features

    • new methods in ElementService: get_number_of_elements, get_number_of_consolidated_elements, get_number_of_leaf_elements

    Bugfixes

    • restrict escaping of single quotes in url to object names only
    • Fix for #124
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Dec 8, 2019)

    Highlights

    New create, get and delete methods in ApplicationService

    with TM1Service(address=ADDRESS, port=PORT, user=USER, password=PASSWORD, ssl=SSL) as tm1:
        app = CubeApplication(path="Planning Sample", name="Sample Application", cube_name="Bike Shares")
        tm1.applications.create(application=app, private=False)
    
    with TM1Service(address=ADDRESS, port=PORT, user=USER, password=PASSWORD, ssl=SSL) as tm1:
        with open(path_to_file, 'rb') as file:
            app = DocumentApplication(path="Planning Sample", name="Sample Application", content=file.read())
            tm1.applications.create(application=app, private=False)
    

    New Features

    • New create, get, delete methods for applications
    • execute_view_dataframe, execute_mdx_dataframe methods now expose all arguments from the pd.read_csv methods (e.g. dtypes, parse_dates) #143 More details on the arguments here: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html
    • Add new method remove_all_edges to HierarchyService to unwind hierarchy efficiently
    • New get_element_identifiers methods that returns all element names and alias values in a set
    • Add get_last_data_update method to CubeService #177
    • Add load and unload methods to CubeService #163
    • Add check_rules method to CubeService

    Bug Fixes

    • Fix issue in chore update method #133 and #134
    • Fix handling of Sandboxes dimension when writing to cube #136
    • Fix return of extract_cellset_rows_and_values method when MDX creates empty cellset #135
    • Escape single quotes in all object names in odata references #145
    • Undo silent type conversion in values column. Type of Value column in resulting dataframe from execute_mdx_dataframe, execute_view_dataframe is derived from data, unless specified otherwise through dtype argument.

    Compatibility Notes

    ApplicationService has been redesigned and is not backwards compatible.

    Acknowledgments

    Big thanks to @tombrzy , @ducklingasa , @rclapp , @pbuncik for contributing code to this release and many others for reporting bugs and requesting features.

    How to upgrade TM1py

    To upgrade TM1py, just use the following command:

    pip install TM1py --upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 1.3.1(May 28, 2019)

  • 1.3.0(May 19, 2019)

    TM1py version 1.3.0 is now available. Getting started with TM1py

    Enhancements

    • TM1py now supports SSO authentication to TM1 using CAM gateway. Previously to connect to a TM1 instance with CAM security, you had to put your user name and passord in the configuration file as below:
    [tm1srv01]
    address=localhost
    port=8884
    user=vviau
    password=YourPassword
    namespace=CUBEWISE
    ssl=True
    

    Now you can replace your user and password with the new gateway parameter such as below

    [tm1srv02]
    address=localhost
    port=8884
    namespace=CUBEWISE
    gateway=http://localhost:80/ibmcognos/cgi-bin/cognos.cgi
    ssl=True
    

    TM1py will use your Windows login to authenticate with TM1. Thanks to adscheevel for adding this new feature to TM1py.

    • The whoami method has been added to get the user and group assignments, associated with your active session. #106

    • Get default element of a hierarchy without need to allocate full hierarchy in memory using the two new HierarchyService methods. #95: get_default_member(dimension_name, hierarchy_name) update_default_member(dimension_name, hierarchy_name, member_name)

    • New boolean parameter to enable base64 encoded passwords in the TM1Service constructor: decode64. #87

    • A new remove_element(element_name) method has been added to the Hierarchy class. It implicitly removes all edges from the hierarchy that are related to the element. #83

    • Introducing a new skip_contexts (boolean) argument in all execute_mdx functions to reduce the response size by omitting the title elements and thus speeds up the execution. #82

    • Two new methods have been added to the CubeService to query and update technical dimension order of a cube. #81

    • Updating a subset is now done entirely through the TM1 REST API instead of calling the SubsetDeleteAllElements TI function behind the scenes. #93

    • New argument in TM1Service constructor: connection_pool_size allows for a custom sized http connection pool. Required when using TM1py in a multithreaded environment.

    • New method in CellService: relative_proportional_spread

    How to upgrade TM1py

    To upgrade TM1py, just use the following command:

    pip install TM1py --upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(Dec 7, 2018)

    TM1py version 1.2.0 is now available. Getting started with TM1py

    Enhancements

    • RestService - TM1py supports now base64 encoded password, TM1py is going to try first to connect using plain password, if authentication fails, it is going to retry authentication with b64decoded password. #66
    • ServerService - New functions to get and update tm1s.cfg parameters live#76:
      • get_static_configuration: get the configuration, as specified in the tm1s.cfg file
      • get_active_configuration: get the configuration, as it currently applies in the TM1 Server
      • update_static_configuration: update the configuration in the tm1s.cfg and trigger TM1 to re-read the file
    • CellService - New functions to extract (pandas) pivot tables (in the shape of the view) from a cube view or MDX #74:
      • execute_view_dataframe_pivot: get data from a cube view
      • execute_mdx_dataframe_pivot get data from MDX
    • ViewService - new (dynamic) get method that returns MDX view or native view. #78
    • ProcessService - New process execution functions#68:
      • execute_with_return: execute a TM1 process and if process failed show the error.
      • get_error_log_file_content: get the content of error-log-files (e.g. TM1ProcessError_20180926213819_65708356_979b248b-232e622c6.log)
    • ElementService - New functions to help managing elements #64:
      • get_elements: get all elements
      • get_leaf_elements: get all leaf elements
      • get_leaf_element_names: get all leaf elements name
    • TM1Service - New optional parameter for session_context, that controls what is displayed in the session column in Arc / Pulse / TM1top. Default value is "TM1py" #61
    • New MDX parser to extract dimension composition from MDX query
    • Improved test suite. Now all tests are deterministic and stand-alone. Success of tests no longer depends on execution order #72

    Bugfixes

    • Bugfix in default view format. Default view format is now: 0.#########
    • Operations on users and groups (e.g. add_user_to_groups) are now case-and-space-insensitive
    • Update of dimension name on python object triggers name update of same-named-hierarchy in dimension #70
    • Fix duplication of tasks when updating chores #69

    How to upgrade TM1py

    To upgrade TM1py, just use the following Python command:

    • pip install TM1py --upgrade
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Aug 8, 2018)

    Bugfixes:

    • Remove variable_ui_data as well when removing variable from process
    • Add new variables to process as type 'Other' instead of 'Ignore'
    • Fix issue that cellsets would not be destroyed after usage

    New Features

    • New functions to retrieve TM1 data in a UI friendly format: execute_mdx_ui_dygraph, execute_mdx_ui_array
    • Make tests compatible with TM1 11.3 (adapt to change in zero suppression for calculated Members in MDX)
    • Prettify execute function. Execute function in ProcessService now takes TI Parameters as keyword arguments. Rename of name_process argument to process_name.
    • Construct_mdx function in MDXUtils now more simple and robust
    • More robust test cases for construct_mdx and underlying functions
    Source code(tar.gz)
    Source code(zip)
  • 1.0.3(Jun 26, 2018)

    New Stuff

    • Get_cellset_cells_count function in CellService
    • New optimized execute_mdx functions in CellService: execute_mdx_get_csv, execute_mdx_get_dataframe
    • New get_members_under_consolidation function in ElementService

    Improvements

    • Improved Cellset handling when executing Views and MDX. Now always delete Cellsets after using them.

    Bugfixes

    • Documentation: http://tm1py.readthedocs.io/en/latest/
    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Jun 4, 2018)

    New stuff:

    • TM1Object (Parent class of Subset, Process, Dimension, etc.) now has eq, ne magic methods. Allows to compare instances of Subset, Dimension, etc for equality with ==, =!
    • RESTService can now be instantiated with 'session_id' parameter. Useful to avoid (unreasonably expensive) CAM Authentication when executing Python from another (REST) TM1 client
    • Refactoring of RESTService
    • get_cellset_cells_count function in CellService
    • build_cellset_from_pandas_dataframe function in Utils class
    • compile_process function added to ProcessService
    • Tests now use config.ini file
    • Execute_mdx_cell_values_only function to query cell-values only
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Apr 27, 2018)

    • Construcor in RESTService / TM1Service now accepts string value for ssl parameter
    • Update docstrings in Subsetservice
    • Add pandas module to project dependencies
    • Adjustments in subset_exists function. Now behaves like other exists functions
    • Bugfix in hierarchycreation fallback (TI), when elementnames start with #
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Feb 14, 2018)

    • Workaround: Dimensionupdates now work. Related to: https://www.ibm.com/developerworks/community/forums/html/topic?id=75f2b99e-6961-4c71-9364-1d5e1e083eff&ps=25
    • Delta request Support for TransactionLog and MessageLog. Sample: https://github.com/cubewise-code/TM1py-samples/blob/master/Other/transactionlog%20delta%20requests.py
    • Read TM1 Application https://github.com/cubewise-code/TM1py-samples/blob/master/Other/get%20TM1%20application.py
    • New Functions in ElementService -> get_all_leaves_under_consolidation and more
    • 90+ automated Tests
    Source code(tar.gz)
    Source code(zip)
  • 0.1.8(Dec 3, 2017)

  • 0.1.7(Nov 27, 2017)

    • Attribute Creation Workaround to Create Dimensions (with Attributes) in PA 2.0.x
    • Bugfix in RESTService. Constructor can now handle namespace=None as a keyword argument (required for check.py sample to work with CAM)
    • Minor Test Improvements
    Source code(tar.gz)
    Source code(zip)
  • 0.1.6(Nov 7, 2017)

    • TM1Service instance can be saved to file, so the session can be reused. https://github.com/cubewise-code/TM1py/issues/31
    • MDX against Dimensions now supported
    • https://github.com/cubewise-code/TM1py/issues/30
    Source code(tar.gz)
    Source code(zip)
  • 0.1.5(Oct 29, 2017)

  • 0.1.4(Oct 22, 2017)

  • 0.1.3(Oct 8, 2017)

    • Introduction of 'base_url' parameter in RESTService constructor. Allows connecting to TM1 in the IBM cloud
    • Query transaction log through ServerService
    • New Module: TI Obufscator. Allows obfuscating TI processes
    • Beautification of unit tests
    • Hierarchy now has boolean attribute: 'balanced'
    • Version now property of TM1 Service

    Bugfixes:

    • Groupnames no longer space sensitive
    Source code(tar.gz)
    Source code(zip)
  • 0.1.2(Sep 4, 2017)

    • New Dimension create function without PATCH. So creating dimension on TM1 11 doesn't run into this bug anymore: https://www.ibm.com/developerworks/community/forums/html/topic?id=75f2b99e-6961-4c71-9364-1d5e1e083eff&ps=25
    Source code(tar.gz)
    Source code(zip)
  • 0.0.1(Aug 8, 2017)

Owner
Cubewise CODE
Making IBM TM1 and IBM Planning Analytics even better.
Cubewise CODE
A Python script that wraps the gitleaks tool to enable scanning of multiple repositories in parallel

mpgitleaks A Python script that wraps the gitleaks tool to enable scanning of multiple repositories in parallel. The motivation behind writing this sc

Emilio Reyes 7 Dec 29, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
A Python Library to interface with Flickr REST API, OAuth & JSON Responses

Python-Flickr Python-Flickr is A Python library to interface with Flickr REST API & OAuth Features Photo Uploading Retrieve user information Common Fl

Mike Helmick 40 Sep 25, 2021
A Python Library to interface with Tumblr v2 REST API & OAuth

Tumblpy Tumblpy is a Python library to help interface with Tumblr v2 REST API & OAuth Features Retrieve user information and blog information Common T

Mike Helmick 125 Jun 20, 2022
Python library for interacting with the Wunderlist 2 REST API

Overview Wunderpy2 is a thin Python library for accessing the official Wunderlist 2 API. What does a thin library mean here? Only the bare minimum of

mieubrisse 24 Dec 29, 2020
NiceHash Python Library and Command Line Rest API

NiceHash Python Library and Command Line Rest API Requirements / Modules pip install requests Required data and where to get it Following data is nee

Ashlin Darius Govindasamy 2 Jan 2, 2022
NiceHash Python Library and Command Line Rest API

NiceHash Python Library and Command Line Rest API Requirements / Modules pip install requests Required data and where to get it Following data is nee

Ashlin Darius Govindasamy 2 Jan 2, 2022
Python library wrapping and enhancing the Invenio RDM REST API.

Iridium The metal Iridium is used to refine and enhance metal alloys. Similarly, this package provides an enhanced coating around the Invenio RDM APIs

Materials Data Science and Informatics 2 Mar 29, 2022
A very simple Salesforce.com REST API client for Python

Simple Salesforce Simple Salesforce is a basic Salesforce.com REST API client built for Python 3.5, 3.6, 3.7 and 3.8. The goal is to provide a very lo

simple salesforce 1.4k Dec 29, 2022
pyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Master Server

PyDuinoCoin PyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Main Server. I

BackrndSource 6 Jul 14, 2022
One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.

AwesomeVersion One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind

Joakim Sørensen 39 Dec 31, 2022
A client library for the REST API of DocuWare's DMS

docuware-client This is a client library for the REST API of DocuWare DMS. Since DocuWare's documentation regarding the REST API is very sparse (at th

Stefan Schönberger 1 Feb 23, 2022
Python Package For MTN Zambia Momo API. This package can also be used by MTN momo in other countries.

MTN MoMo API Lite Python Client Power your apps with Lite-Python MTN MoMo API Usage Installation Add the latest version of the library to your project

Mathews Musukuma 7 Jan 1, 2023
WhatsApp Api Python - This documentation aims to exemplify the use of Moorse Whatsapp API in Python

WhatsApp API Python ChatBot Este repositório contém uma aplicação que se utiliza

Moorse.io 3 Jan 8, 2022
📦 Opensource Python wrapper for Hiven's REST and WebSocket API

hiven.py ?? Opensource Python wrapper for Hiven's REST and WebSocket API Installation pip install -U hiven.py Usage hiven.py is currently under devel

Kevin Thomas 3 Sep 3, 2021
Python bindings for swm-core client REST API

Python bindings for swm-core client REST API Description Sky Port is an universal bus between user software and compute resources. It can also be cons

Sky Workflows 1 Jan 1, 2022
An unofficial Python wrapper for the 'Binance exchange REST API'

Welcome to binex_f v0.1.0 many interfaces are heavily used by myself in product environment, the websocket is reliable (re)connected. Latest version:

DeepLn 2 Jan 5, 2022
This package accesses nitrotype's official api along with its unofficial user api

NitrotypePy This package accesses nitrotype's official api along with its unofficial user api. Currently still in development. Install To install, run

The Moon That Rises 2 Sep 4, 2022