![MicroStrategy Logo][logo]
[![image](https://img.shields.io/pypi/v/mstrio-py.svg)](https://pypi.org/project/mstrio-py)
[![image](https://img.shields.io/pypi/l/mstrio-py.svg)](https://pypi.org/project/mstrio-py)
[![image](https://img.shields.io/pypi/dm/mstrio-py.svg)](https://pypi.org/project/mstrio-py)
# mstrio: Simple and Secure Access to MicroStrategy Data <!-- omit in toc -->
**mstrio** provides a high-level interface for [Python][py_github] and [R][r_github] and is designed to give data scientists and developers simple and secure access to MicroStrategy data. It wraps [MicroStrategy REST APIs][mstr_rest_docs] into simple workflows, allowing users to connect to their MicroStrategy environment, fetch data from cubes and reports, create new datasets, and add new data to existing datasets. And, because it enforces MicroStrategy's user and object security model, you don't need to worry about setting up separate security rules.
With **mstrio**, it's easy to integrate cross-departmental, trustworthy business data in machine learning workflows and enable decision-makers to take action on predictive insights in MicroStrategy reports, Dossiers, HyperIntelligence Cards, and customized, embedded analytical applications.
**MicroStrategy for Jupyter** is an extension for Jupyter Notebook which provides a graphical user interface for **mstrio-py** methods with the help of which user can perform all of the import and export actions without writing a single line of code manually. MicroStrategy for Jupyter is contained within **mstrio-py** package and is available after installation and enabling as Jupyter extension.
# Table of Contents <!-- omit in toc -->
<!--ts-->
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [mstrio-py](#mstrio-py)
- [MicroStrategy for Jupyter](#microstrategy-for-jupyter)
- [Install the `mstrio-py` Package](#install-the-mstrio-py-package)
- [Enable the Jupyter Notebook extension](#enable-the-jupyter-notebook-extension)
- [Versioning & Main Features](#versioning--main-features)
- [Versioning](#versioning)
- [Main Features](#main-features)
- [Usage](#usage)
- [Connect to MicroStrategy](#connect-to-microstrategy)
- [Authentication Methods](#authentication-methods)
- [SSL Self-signed Certificate](#ssl-self-signed-certificate)
- [Import Data from Cubes and Reports](#import-data-from-cubes-and-reports)
- [Export Data into MicroStrategy with Datasets](#export-data-into-microstrategy-with-datasets)
- [Create a New Dataset](#create-a-new-dataset)
- [Update a Dataset](#update-a-dataset)
- [Certify a dataset](#certify-a-dataset)
- [Limitations](#limitations)
- [More Resources](#more-resources)
- [Other](#other)
<!--te-->
# Installation
## Prerequisites
### mstrio-py
* Python 3.6+
* MicroStrategy 2019 Update 4 (11.1.4)+
### MicroStrategy for Jupyter
* mstrio-py 11.1.4+
* Jupyter Notebook 6.0.2+
* ipywidgets 7.5.1+
* [CORS enabled on MicroStrategy Library server][cors_manual]
* [Cookies sent by MicroStrategy Library server have `SameSite` parameter set to `None`][same_site_manual]
## Install the `mstrio-py` Package
**Note**: it is not recommended to install mstrio-py in an Anaconda environment.
For a seamless experience, install and run it in Python's [virtual environment][python_venv] instead.
Installation is easy when using [pip](https://pypi.org/project/mstrio-py). Read more about installation on MicroStrategy's [product documentation][mstr_help_docs].
```
pip3 install mstrio-py
```
## Enable the Jupyter Notebook extension
Once mstrio-py is installed you can install and enable the Jupyter Notebook extension by using the commands below:
```
jupyter nbextension install connector-jupyter --py --sys-prefix
jupyter nbextension enable connector-jupyter --py --sys-prefix
```
# Versioning & Main Features
## Versioning
Current version: **11.2.2.1** (4 August 2020). Check out [Release Notes][release_notes] to see what's new.
Functionalities may be added to mstrio either in combination with annual MicroStrategy platform releases or through updates to platform releases. To ensure compatibility with APIs supported by your MicroStrategy environment, it is recommended to install a version of mstrio that corresponds to the version number of your MicroStrategy environment.
The current version of mstrio-py is 11.2.2.1 and is supported on MicroStrategy 2019 Update 4 (11.1.4) and later. To leverage MicroStrategy for Jupyter, mstrio-py (11.1.4), Jupyter Notebook (6.0.2), ipywidgets (7.5.1) and MicroStrategy 2019 Update 4 (11.1.4) or higher are required.
If you intend to use mstrio with MicroStrategy version older than 11.1.4, refer to the Pypi package archive to download mstrio 10.11.1, which is supported on:
* MicroStrategy 2019 (11.1)
* MicroStrategy 2019 Update 1 (11.1.1)
* MicroStrategy 2019 Update 2 (11.1.2)
* MicroStrategy 2019 Update 3 (11.1.3)
Refer to the [PyPi package archive][pypi_archive] for a list of available versions.
To install a specific, archived version of mstrio, choose the desired version available on [PyPi's package archive][pypi_archive] and install with `pip`, as follows:
```python
pip install mstrio-py==10.11.1
```
## Main Features
Read the following tutorials to become more familiar with **mstrio-py**
- Connect to your MicroStrategy environment
- Import data from a Report into a Pandas DataFrame
- Import data from a Cube into a Pandas DataFrame
- Filter Cubes and Reports by selecting Attributes and Metrics or specifying a view filter
- Export data into MicroStrategy by creating Datasets
- Update, replace, or append new data to an existing Dataset
# Usage
## Connect to MicroStrategy
The `Connection` object manages your connection to MicroStrategy. Connect to your MicroStrategy environment by providing the URL to the MicroStrategy REST API server, your username, password and the ID of the Project to connect to. When a `Connection` object is created the user will be automatically logged-in.
```python
from mstrio.connection import Connection
import getpass
base_url = "https://your-microstrategy-server.com/MicroStrategyLibrary/api"
mstr_username = "Username"
mstr_password = getpass.getpass("Password: ")
project_id = "PROJECT_ID"
conn = Connection(base_url, mstr_username, mstr_password, project_id=project_id)
```
The URL for the REST API server typically follows this format: _https://your-microstrategy-server.com/MicroStrategyLibrary/api_
Validate that the REST API server is running by accessing _https://your-microstrategy-server.com/MicroStrategyLibrary/api-docs_ in your web browser.
To manage the connection the following methods are made available:
```python
conn.connect()
conn.renew()
conn.close()
conn.status()
```
### Authentication Methods
Currently, supported authentication modes are **Standard** (the default) and **LDAP**. To use LDAP, add `login_mode=16` when creating your `Connection` object:
```python
conn = Connection(base_url, mstr_username, mstr_password, project_id=project_id, login_mode=16)
```
Optionally, the `Connection` object can be created by passing the `identity_token` parameter, which will create a delegated session. The identity token can be obtained by sending a request to MicroStrategy REST API `/auth/identityToken` endpoint.
```python
conn = Connection(base_url, identity_token=identity_token, project_id=project_id)
```
### SSL Self-signed Certificate
By default, SSL certificates are validated with each API request. To turn this off, use `ssl_verify` flag:
```python
conn = Connection(base_url, mstr_username, mstr_password, project_id=project_id, ssl_verify=False)
```
If you are using a SSL with a self-signed certificate you will need to perform an additional step to configure your connection. There are 2 ways to set it up:
1. The easiest way to configure the SSL is to move your certificate file to your working directory. Just make sure the `ssl_verify` parameter is set to `True` when creating the `Connection` object in
没有合适的资源?快使用搜索试试~ 我知道了~
PyPI 官网下载 | mstrio-py-11.2.2.1.1734.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 37 浏览量
2022-01-13
10:05:21
上传
评论
收藏 1.01MB GZ 举报
温馨提示
共68个文件
py:22个
js:12个
json:7个
资源来自pypi官网。 资源全名:mstrio-py-11.2.2.1.1734.tar.gz
资源推荐
资源详情
资源评论
收起资源包目录
mstrio-py-11.2.2.1.1734.tar.gz (68个子文件)
mstrio-py-11.2.2.1
MANIFEST.in 100B
PKG-INFO 20KB
connector-jupyter
package.json 168B
production
jupyter-config
nbconfig
notebook.d
mstr_jupyter.json 61B
mstr_jupyter
static
mstr-connector
build
service-worker.js 1KB
asset-manifest.json 2KB
precache-manifest.453069e3adcc1d405279e97ce73062e3.js 3KB
manifest.json 329B
index.html 2KB
static
css
2.4ff82ede.chunk.css 462KB
main.41ff8f48.chunk.css 57KB
media
icon_success.09f1ebe8.svg 1KB
sort-indicator-desc-icon.99f73780.svg 760B
draggable_icon.8ad8988c.svg 2KB
icon-downarrow.63cd8448.svg 882B
icon-uparrow.823f5cc2.svg 1KB
sort-indicator-none-icon.6e7e2adc.svg 731B
js
runtime-main.2000082d.js 1KB
main.a1a828e0.chunk.js 588KB
2.ee8f0df1.chunk.js.LICENSE.txt 2KB
2.ee8f0df1.chunk.js 2.68MB
favicon.ico 977B
config.json 433B
ui-iframe.css 504B
global-override.css 1011B
package-lock.json 27B
MicroStrategy.yaml 225B
python-code.js 10KB
jupyter-kernel.js 8KB
jupyter-cells.js 5KB
main.js 12KB
utilities.js 3KB
mstr.ico 977B
build_helpers
package.json 1KB
BackendHelper.js 425B
__init__.py 262B
.eslintrc.js 580B
.gitignore 21B
yarn.lock 55KB
version.txt 8B
mstrio_py.egg-info
PKG-INFO 20KB
requires.txt 124B
SOURCES.txt 4KB
top_level.txt 31B
dependency_links.txt 1B
setup.cfg 38B
mstrio
report.py 21KB
microstrategy.py 359B
dataset.py 16KB
api
authentication.py 5KB
misc.py 1023B
datasets.py 11KB
reports.py 6KB
cubes.py 8KB
projects.py 739B
__init__.py 0B
cube.py 23KB
__init__.py 214B
connection.py 12KB
utils
helper.py 2KB
encoder.py 2KB
parser.py 7KB
formjson.py 2KB
__init__.py 0B
filter.py 7KB
model.py 10KB
setup.py 2KB
README.md 16KB
共 68 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功