cubewise-code / tm1py

TM1py is a Python package that wraps the TM1 REST API in a simple to use library.
http://tm1py.readthedocs.io/en/latest/
MIT License
190 stars 109 forks source link

No module named TM1pyQueries #32

Closed jwk019 closed 7 years ago

jwk019 commented 7 years ago

From the code import TM1py from TM1py import TM1pyQueries as TM1

Result: No module named 'TM1pyQueries'

MariusWirtz commented 7 years ago

that's not how you import TM1py. Here is a sample how to import and use TM1py:

# Import TM1py
from TM1py.Services import TM1Service

# Connection to TM1 Server
with TM1Service(address='localhost', port=12354, user='admin', password='apple', ssl=True) as tm1:
    # Read chore:
    c = tm1.chores.get('0300 Save Data')
    print(c.start_time)

Here are more samples: https://github.com/cubewise-code/TM1py-samples

jwk019 commented 7 years ago

Well played. Thanks for the quick response --