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.
Metadata
Release files for TM1py 1.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tm1py-1.11.1.tar.gz | 116.9 kB | Without provenance | Details for tm1py-1.11.1.tar.gz |
Release files / tm1py-1.11.1.tar.gz
| Download URL | tm1py-1.11.1.tar.gz |
|---|---|
| Size | 116.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94c94d14d0735d768f54943cf2168f65be94c45787d009a5c5ed87878de94b22
|
|
BLAKE2b-256 checksum How to use checksums |
ceab37606a3efd7087c3dd66e7406b95cd2ba6ab4bb6033b30158b5d346658fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for TM1py 1.11.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.