TM1py is a free Python package that extends the functionality of Planning Analytics by integrating the TM1 REST API with Python allowing the use of Python libraries. TM1py enhances data source integration, enables machine learning using python, and facilitates Planning Analytics object control using Python automation.

In a recent internal “Hackathon” a group of QueBIT employees started on the path to see what could be accomplished using TM1py and find out how it can help improve our processes. During this quick experiment the team wanted to focus on developing a tool using Python and TM1py that would assist our consultants by easing the development, troubleshooting, and health check tasks that we undergo during our projects. The source code and releases of this project can be found on the QueBIT Consulting GitHub page here: https://github.com/QueBITConsulting/Tm1PyGuild (This code is under development and should not be used in a Production environment)

During the development of functions built with TM1py, a range of solutions was created while keeping the intent of following QueBIT standards and best practices in mind. Starting with simple functions such as logging into the PA server, or printing a list of objects (cubes, dimensions, etc..). While these functions are relatively simple, they provide value in gathering important PA instance information near instantly. Once the team understood the basics of TM1py, we started digging into more complex problems and solutions. A function was created that would build our standard Process Statistics cube by creating all necessary dimensions and attributes, building the cube, and applying rules to the cube. Another function was built to apply the QueBIT standard boilerplate to all processes on the PA instance. These tasks may take many development hours when done manually but can now be finished in moments by running a function. Check the documentation on the GitHub page linked above to learn about other functions that have been created.

Because TM1py is a Python package, it allows it to be used within QueBIT’s Euclid Studio. Euclid Studio is a special–purpose ETL (Extract, Translate, Load) solution designed for business users and xP&A. One of the nodes in Euclid Studio allows a user to create and run a python script. This node can then be scheduled or triggered to run when needed. This could be done to gather information of the PA instance, confirm data integrity, validate dimensions, and many other possibilities on a set schedule. To learn more about Euclid Studio see here: https://quebit.com/euclid-studio/

Other than using TM1py directly within Euclid Studio, the team also packaged the python script into a command line executable file to ease the distribution of the functionality it provides. PyInstaller is used to bundle the python application whenever an update is made to the source code. The latest release can be found on the QueBIT Consulting GitHub page linked above.

From the initial experience developing this suite of administrative functions with TM1py, we are interested in adding to its capabilities and determining what functions could be beneficial. If you have an idea for a new function or have a problem that you think can be solved with the Python integration that TM1py helps facilitate, please do not hesitate to add a suggestion in the “Issues” section of the GitHub page.