Skip to content

Commit

Permalink
Merge pull request #30 from MariusWirtz/master
Browse files Browse the repository at this point in the history
session_context sample
  • Loading branch information
vviau committed Sep 5, 2018
2 parents af4ab30 + 9b4d0ff commit c1f1d3c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Other/custom session context.py
@@ -0,0 +1,18 @@
"""
Instantiate TM1py with a custom session_context.
Session_context is displayed in column "session" in Arc
"""

import configparser

from TM1py.Services import TM1Service

config = configparser.ConfigParser()
config.read('..\config.ini')

APP_NAME = "My TM1py Application"

with TM1Service(**config['tm1srv01'], session_context=APP_NAME) as tm1:
dimensions = tm1.dimensions.get_all_names()
for dim in dimensions:
print(dim)

0 comments on commit c1f1d3c

Please sign in to comment.