MicroStrategy / mstrio-py

Python integration for MicroStrategy
Apache License 2.0
89 stars 59 forks source link

install only required dependencies, avoid notebook & ipython #105

Closed aksakalli closed 1 year ago

aksakalli commented 1 year ago

Currently we have lots of non-essential dependencies in pyproject.toml as follows

https://github.com/MicroStrategy/mstrio-py/blob/f63a1193b25a876b6621e919987f9a678e6a1fdb/pyproject.toml#L29-L40

I just use this project as a simple MicroStrategy client for some integration CRON job and it's installing bunch of extra dependencies that are not essential for a client library. There should be some optional extras like pip install mstrio-py[notebook] If you want to keep non-essential packages such as notebook and ipython. Otherwise I have a huge dependency tree that I don't need at all:

mstrio-py 11.3.6.103 Python interface for the MicroStrategy REST API
|-- ipython >=8.1.1,<9
|   |-- appnope * 
|   |-- backcall * 
|   |-- colorama * 
|   |-- decorator * 
|   |-- jedi >=0.16 
|   |   `-- parso >=0.8.0,<0.9.0 
|   |-- matplotlib-inline * 
|   |   `-- traitlets * 
|   |-- pexpect >4.3 
|   |   `-- ptyprocess >=0.5 
|   |-- pickleshare * 
|   |-- prompt-toolkit >3.0.1,<3.1.0 
|   |   `-- wcwidth * 
|   |-- pygments >=2.4.0 
|   |-- stack-data * 
|   |   |-- asttokens * 
|   |   |   `-- six * 
|   |   |-- executing * 
|   |   `-- pure-eval * 
|   `-- traitlets >=5 (circular dependency aborted here)
|-- ipywidgets >=7.5.1,<8
|   |-- ipykernel >=4.5.1 
|   |   |-- appnope * 
|   |   |-- debugpy >=1.0 
|   |   |-- ipython >=7.23.1 
|   |   |   |-- appnope * (circular dependency aborted here)
|   |   |   |-- backcall * 
|   |   |   |-- colorama * 
|   |   |   |-- decorator * 
|   |   |   |-- jedi >=0.16 
|   |   |   |   `-- parso >=0.8.0,<0.9.0 
|   |   |   |-- matplotlib-inline * 
|   |   |   |   `-- traitlets * 
|   |   |   |-- pexpect >4.3 
|   |   |   |   `-- ptyprocess >=0.5 
|   |   |   |-- pickleshare * 
|   |   |   |-- prompt-toolkit >3.0.1,<3.1.0 
|   |   |   |   `-- wcwidth * 
|   |   |   |-- pygments >=2.4.0 
|   |   |   |-- stack-data * 
|   |   |   |   |-- asttokens * 
|   |   |   |   |   `-- six * 
|   |   |   |   |-- executing * 
|   |   |   |   `-- pure-eval * 
|   |   |   `-- traitlets >=5 (circular dependency aborted here)
|   |   |-- jupyter-client >=6.1.12 
|   |   |   |-- entrypoints * 
|   |   |   |-- jupyter-core >=4.9.2 
|   |   |   |   |-- pywin32 >=1.0 
|   |   |   |   `-- traitlets * (circular dependency aborted here)
|   |   |   |-- nest-asyncio >=1.5.4 
|   |   |   |-- python-dateutil >=2.8.2 
|   |   |   |   `-- six >=1.5 (circular dependency aborted here)
|   |   |   |-- pyzmq >=23.0 
|   |   |   |   |-- cffi * 
|   |   |   |   |   `-- pycparser * 
|   |   |   |   `-- py * 
|   |   |   |-- tornado >=6.2 
|   |   |   `-- traitlets * (circular dependency aborted here)
|   |   |-- matplotlib-inline >=0.1 (circular dependency aborted here)
|   |   |-- nest-asyncio * (circular dependency aborted here)
|   |   |-- packaging * 
|   |   |   `-- pyparsing >=2.0.2,<3.0.5 || >3.0.5 
|   |   |-- psutil * 
|   |   |-- pyzmq >=17 (circular dependency aborted here)
|   |   |-- tornado >=6.1 (circular dependency aborted here)
|   |   `-- traitlets >=5.1.0 (circular dependency aborted here)
|   |-- ipython >=4.0.0 (circular dependency aborted here)
|   |-- ipython-genutils >=0.2.0,<0.3.0 
|   |-- jupyterlab-widgets >=1.0.0,<3 
|   |-- traitlets >=4.3.1 (circular dependency aborted here)
|   `-- widgetsnbextension >=3.6.0,<3.7.0 
|       `-- notebook >=4.4.1 
|           |-- argon2-cffi * 
|           |   `-- argon2-cffi-bindings * 
|           |       `-- cffi >=1.0.1 (circular dependency aborted here)
|           |-- ipykernel * (circular dependency aborted here)
|           |-- ipython-genutils * (circular dependency aborted here)
|           |-- jinja2 * 
|           |   `-- markupsafe >=2.0 
|           |-- jupyter-client >=5.3.4 (circular dependency aborted here)
|           |-- jupyter-core >=4.6.1 (circular dependency aborted here)
|           |-- nbconvert >=5 
|           |   |-- beautifulsoup4 * 
|           |   |   `-- soupsieve >1.2 
|           |   |-- bleach * 
|           |   |   |-- six >=1.9.0 (circular dependency aborted here)
|           |   |   `-- webencodings * 
|           |   |-- defusedxml * 
|           |   |-- jinja2 >=3.0 (circular dependency aborted here)
|           |   |-- jupyter-core >=4.7 (circular dependency aborted here)
|           |   |-- jupyterlab-pygments * 
|           |   |-- lxml * 
|           |   |-- markupsafe >=2.0 (circular dependency aborted here)
|           |   |-- mistune >=2.0.3,<3 
|           |   |-- nbclient >=0.5.0 
|           |   |   |-- jupyter-client >=6.1.5 (circular dependency aborted here)
|           |   |   |-- nbformat >=5.0 
|           |   |   |   |-- fastjsonschema * 
|           |   |   |   |-- jsonschema >=2.6 
|           |   |   |   |   |-- attrs >=17.4.0 
|           |   |   |   |   `-- pyrsistent >=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2 
|           |   |   |   |-- jupyter-core * (circular dependency aborted here)
|           |   |   |   `-- traitlets >=5.1 (circular dependency aborted here)
|           |   |   |-- nest-asyncio * (circular dependency aborted here)
|           |   |   `-- traitlets >=5.2.2 (circular dependency aborted here)
|           |   |-- nbformat >=5.1 (circular dependency aborted here)
|           |   |-- packaging * (circular dependency aborted here)
|           |   |-- pandocfilters >=1.4.1 
|           |   |-- pygments >=2.4.1 (circular dependency aborted here)
|           |   |-- tinycss2 * 
|           |   |   `-- webencodings >=0.4 (circular dependency aborted here)
|           |   `-- traitlets >=5.0 (circular dependency aborted here)
|           |-- nbformat * (circular dependency aborted here)
|           |-- nest-asyncio >=1.5 (circular dependency aborted here)
|           |-- prometheus-client * 
|           |-- pyzmq >=17 (circular dependency aborted here)
|           |-- send2trash >=1.8.0 
|           |-- terminado >=0.8.3 
|           |   |-- ptyprocess * (circular dependency aborted here)
|           |   |-- pywinpty >=1.1.0 
|           |   `-- tornado >=6.1.0 (circular dependency aborted here)
|           |-- tornado >=6.1 (circular dependency aborted here)
|           `-- traitlets >=4.2.1 (circular dependency aborted here)
|-- jupyter-contrib-nbextensions >=0.5.1,<0.6
|   |-- ipython-genutils * 
|   |-- jupyter-contrib-core >=0.3.3 
|   |   |-- jupyter-core * 
|   |   |   |-- pywin32 >=1.0 
|   |   |   `-- traitlets * 
|   |   |-- notebook >=4.0 
|   |   |   |-- argon2-cffi * 
|   |   |   |   `-- argon2-cffi-bindings * 
|   |   |   |       `-- cffi >=1.0.1 
|   |   |   |           `-- pycparser * 
|   |   |   |-- ipykernel * 
|   |   |   |   |-- appnope * 
|   |   |   |   |-- debugpy >=1.0 
|   |   |   |   |-- ipython >=7.23.1 
|   |   |   |   |   |-- appnope * (circular dependency aborted here)
|   |   |   |   |   |-- backcall * 
|   |   |   |   |   |-- colorama * 
|   |   |   |   |   |-- decorator * 
|   |   |   |   |   |-- jedi >=0.16 
|   |   |   |   |   |   `-- parso >=0.8.0,<0.9.0 
|   |   |   |   |   |-- matplotlib-inline * 
|   |   |   |   |   |   `-- traitlets * (circular dependency aborted here)
|   |   |   |   |   |-- pexpect >4.3 
|   |   |   |   |   |   `-- ptyprocess >=0.5 
|   |   |   |   |   |-- pickleshare * 
|   |   |   |   |   |-- prompt-toolkit >3.0.1,<3.1.0 
|   |   |   |   |   |   `-- wcwidth * 
|   |   |   |   |   |-- pygments >=2.4.0 
|   |   |   |   |   |-- stack-data * 
|   |   |   |   |   |   |-- asttokens * 
|   |   |   |   |   |   |   `-- six * 
|   |   |   |   |   |   |-- executing * 
|   |   |   |   |   |   `-- pure-eval * 
|   |   |   |   |   `-- traitlets >=5 (circular dependency aborted here)
|   |   |   |   |-- jupyter-client >=6.1.12 
|   |   |   |   |   |-- entrypoints * 
|   |   |   |   |   |-- jupyter-core >=4.9.2 (circular dependency aborted here)
|   |   |   |   |   |-- nest-asyncio >=1.5.4 
|   |   |   |   |   |-- python-dateutil >=2.8.2 
|   |   |   |   |   |   `-- six >=1.5 (circular dependency aborted here)
|   |   |   |   |   |-- pyzmq >=23.0 
|   |   |   |   |   |   |-- cffi * (circular dependency aborted here)
|   |   |   |   |   |   `-- py * 
|   |   |   |   |   |-- tornado >=6.2 
|   |   |   |   |   `-- traitlets * (circular dependency aborted here)
|   |   |   |   |-- matplotlib-inline >=0.1 (circular dependency aborted here)
|   |   |   |   |-- nest-asyncio * (circular dependency aborted here)
|   |   |   |   |-- packaging * 
|   |   |   |   |   `-- pyparsing >=2.0.2,<3.0.5 || >3.0.5 
|   |   |   |   |-- psutil * 
|   |   |   |   |-- pyzmq >=17 (circular dependency aborted here)
|   |   |   |   |-- tornado >=6.1 (circular dependency aborted here)
|   |   |   |   `-- traitlets >=5.1.0 (circular dependency aborted here)
|   |   |   |-- ipython-genutils * (circular dependency aborted here)
|   |   |   |-- jinja2 * 
|   |   |   |   `-- markupsafe >=2.0 
|   |   |   |-- jupyter-client >=5.3.4 (circular dependency aborted here)
|   |   |   |-- jupyter-core >=4.6.1 (circular dependency aborted here)
|   |   |   |-- nbconvert >=5 
|   |   |   |   |-- beautifulsoup4 * 
|   |   |   |   |   `-- soupsieve >1.2 
|   |   |   |   |-- bleach * 
|   |   |   |   |   |-- six >=1.9.0 (circular dependency aborted here)
|   |   |   |   |   `-- webencodings * 
|   |   |   |   |-- defusedxml * 
|   |   |   |   |-- jinja2 >=3.0 (circular dependency aborted here)
|   |   |   |   |-- jupyter-core >=4.7 (circular dependency aborted here)
|   |   |   |   |-- jupyterlab-pygments * 
|   |   |   |   |-- lxml * 
|   |   |   |   |-- markupsafe >=2.0 (circular dependency aborted here)
|   |   |   |   |-- mistune >=2.0.3,<3 
|   |   |   |   |-- nbclient >=0.5.0 
|   |   |   |   |   |-- jupyter-client >=6.1.5 (circular dependency aborted here)
|   |   |   |   |   |-- nbformat >=5.0 
|   |   |   |   |   |   |-- fastjsonschema * 
|   |   |   |   |   |   |-- jsonschema >=2.6 
|   |   |   |   |   |   |   |-- attrs >=17.4.0 
|   |   |   |   |   |   |   `-- pyrsistent >=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2 
|   |   |   |   |   |   |-- jupyter-core * (circular dependency aborted here)
|   |   |   |   |   |   `-- traitlets >=5.1 (circular dependency aborted here)
|   |   |   |   |   |-- nest-asyncio * (circular dependency aborted here)
|   |   |   |   |   `-- traitlets >=5.2.2 (circular dependency aborted here)
|   |   |   |   |-- nbformat >=5.1 (circular dependency aborted here)
|   |   |   |   |-- packaging * (circular dependency aborted here)
|   |   |   |   |-- pandocfilters >=1.4.1 
|   |   |   |   |-- pygments >=2.4.1 (circular dependency aborted here)
|   |   |   |   |-- tinycss2 * 
|   |   |   |   |   `-- webencodings >=0.4 (circular dependency aborted here)
|   |   |   |   `-- traitlets >=5.0 (circular dependency aborted here)
|   |   |   |-- nbformat * (circular dependency aborted here)
|   |   |   |-- nest-asyncio >=1.5 (circular dependency aborted here)
|   |   |   |-- prometheus-client * 
|   |   |   |-- pyzmq >=17 (circular dependency aborted here)
|   |   |   |-- send2trash >=1.8.0 
|   |   |   |-- terminado >=0.8.3 
|   |   |   |   |-- ptyprocess * (circular dependency aborted here)
|   |   |   |   |-- pywinpty >=1.1.0 
|   |   |   |   `-- tornado >=6.1.0 (circular dependency aborted here)
|   |   |   |-- tornado >=6.1 (circular dependency aborted here)
|   |   |   `-- traitlets >=4.2.1 (circular dependency aborted here)
|   |   |-- tornado * (circular dependency aborted here)
|   |   `-- traitlets * (circular dependency aborted here)
|   |-- jupyter-core * (circular dependency aborted here)
|   |-- jupyter-highlight-selected-word >=0.1.1 
|   |-- jupyter-latex-envs >=1.3.8 
|   |   |-- ipython * (circular dependency aborted here)
|   |   |-- jupyter-core * (circular dependency aborted here)
|   |   |-- nbconvert * (circular dependency aborted here)
|   |   |-- notebook >=4.0 (circular dependency aborted here)
|   |   `-- traitlets >=4.1 (circular dependency aborted here)
|   |-- jupyter-nbextensions-configurator >=0.4.0 
|   |   |-- jupyter-contrib-core >=0.3.3 (circular dependency aborted here)
|   |   |-- jupyter-core * (circular dependency aborted here)
|   |   |-- notebook >=6.0 (circular dependency aborted here)
|   |   |-- pyyaml * 
|   |   |-- tornado * (circular dependency aborted here)
|   |   `-- traitlets * (circular dependency aborted here)
|   |-- lxml * (circular dependency aborted here)
|   |-- nbconvert >=4.2 (circular dependency aborted here)
|   |-- notebook >=4.0 (circular dependency aborted here)
|   |-- pyyaml * (circular dependency aborted here)
|   |-- tornado * (circular dependency aborted here)
|   `-- traitlets >=4.1 (circular dependency aborted here)
|-- lxml >=4.9.1
|-- notebook >=6.4.12
|   |-- argon2-cffi * 
|   |   `-- argon2-cffi-bindings * 
|   |       `-- cffi >=1.0.1 
|   |           `-- pycparser * 
|   |-- ipykernel * 
|   |   |-- appnope * 
|   |   |-- debugpy >=1.0 
|   |   |-- ipython >=7.23.1 
|   |   |   |-- appnope * (circular dependency aborted here)
|   |   |   |-- backcall * 
|   |   |   |-- colorama * 
|   |   |   |-- decorator * 
|   |   |   |-- jedi >=0.16 
|   |   |   |   `-- parso >=0.8.0,<0.9.0 
|   |   |   |-- matplotlib-inline * 
|   |   |   |   `-- traitlets * 
|   |   |   |-- pexpect >4.3 
|   |   |   |   `-- ptyprocess >=0.5 
|   |   |   |-- pickleshare * 
|   |   |   |-- prompt-toolkit >3.0.1,<3.1.0 
|   |   |   |   `-- wcwidth * 
|   |   |   |-- pygments >=2.4.0 
|   |   |   |-- stack-data * 
|   |   |   |   |-- asttokens * 
|   |   |   |   |   `-- six * 
|   |   |   |   |-- executing * 
|   |   |   |   `-- pure-eval * 
|   |   |   `-- traitlets >=5 (circular dependency aborted here)
|   |   |-- jupyter-client >=6.1.12 
|   |   |   |-- entrypoints * 
|   |   |   |-- jupyter-core >=4.9.2 
|   |   |   |   |-- pywin32 >=1.0 
|   |   |   |   `-- traitlets * (circular dependency aborted here)
|   |   |   |-- nest-asyncio >=1.5.4 
|   |   |   |-- python-dateutil >=2.8.2 
|   |   |   |   `-- six >=1.5 (circular dependency aborted here)
|   |   |   |-- pyzmq >=23.0 
|   |   |   |   |-- cffi * (circular dependency aborted here)
|   |   |   |   `-- py * 
|   |   |   |-- tornado >=6.2 
|   |   |   `-- traitlets * (circular dependency aborted here)
|   |   |-- matplotlib-inline >=0.1 (circular dependency aborted here)
|   |   |-- nest-asyncio * (circular dependency aborted here)
|   |   |-- packaging * 
|   |   |   `-- pyparsing >=2.0.2,<3.0.5 || >3.0.5 
|   |   |-- psutil * 
|   |   |-- pyzmq >=17 (circular dependency aborted here)
|   |   |-- tornado >=6.1 (circular dependency aborted here)
|   |   `-- traitlets >=5.1.0 (circular dependency aborted here)
|   |-- ipython-genutils * 
|   |-- jinja2 * 
|   |   `-- markupsafe >=2.0 
|   |-- jupyter-client >=5.3.4 (circular dependency aborted here)
|   |-- jupyter-core >=4.6.1 (circular dependency aborted here)
|   |-- nbconvert >=5 
|   |   |-- beautifulsoup4 * 
|   |   |   `-- soupsieve >1.2 
|   |   |-- bleach * 
|   |   |   |-- six >=1.9.0 (circular dependency aborted here)
|   |   |   `-- webencodings * 
|   |   |-- defusedxml * 
|   |   |-- jinja2 >=3.0 (circular dependency aborted here)
|   |   |-- jupyter-core >=4.7 (circular dependency aborted here)
|   |   |-- jupyterlab-pygments * 
|   |   |-- lxml * 
|   |   |-- markupsafe >=2.0 (circular dependency aborted here)
|   |   |-- mistune >=2.0.3,<3 
|   |   |-- nbclient >=0.5.0 
|   |   |   |-- jupyter-client >=6.1.5 (circular dependency aborted here)
|   |   |   |-- nbformat >=5.0 
|   |   |   |   |-- fastjsonschema * 
|   |   |   |   |-- jsonschema >=2.6 
|   |   |   |   |   |-- attrs >=17.4.0 
|   |   |   |   |   `-- pyrsistent >=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2 
|   |   |   |   |-- jupyter-core * (circular dependency aborted here)
|   |   |   |   `-- traitlets >=5.1 (circular dependency aborted here)
|   |   |   |-- nest-asyncio * (circular dependency aborted here)
|   |   |   `-- traitlets >=5.2.2 (circular dependency aborted here)
|   |   |-- nbformat >=5.1 (circular dependency aborted here)
|   |   |-- packaging * (circular dependency aborted here)
|   |   |-- pandocfilters >=1.4.1 
|   |   |-- pygments >=2.4.1 (circular dependency aborted here)
|   |   |-- tinycss2 * 
|   |   |   `-- webencodings >=0.4 (circular dependency aborted here)
|   |   `-- traitlets >=5.0 (circular dependency aborted here)
|   |-- nbformat * (circular dependency aborted here)
|   |-- nest-asyncio >=1.5 (circular dependency aborted here)
|   |-- prometheus-client * 
|   |-- pyzmq >=17 (circular dependency aborted here)
|   |-- send2trash >=1.8.0 
|   |-- terminado >=0.8.3 
|   |   |-- ptyprocess * (circular dependency aborted here)
|   |   |-- pywinpty >=1.1.0 
|   |   `-- tornado >=6.1.0 (circular dependency aborted here)
|   |-- tornado >=6.1 (circular dependency aborted here)
|   `-- traitlets >=4.2.1 (circular dependency aborted here)
|-- numpy >=1.23.1,<1.24
|-- packaging >=21.3,<22
|   `-- pyparsing >=2.0.2,<3.0.5 || >3.0.5 
|-- pandas >=1.1.5,<=1.5
|   |-- numpy >=1.21.0 
|   |-- python-dateutil >=2.8.1 
|   |   `-- six >=1.5 
|   `-- pytz >=2020.1 
|-- requests >=2.27,<2.29
|   |-- certifi >=2017.4.17 
|   |-- charset-normalizer >=2,<3 
|   |-- idna >=2.5,<4 
|   `-- urllib3 >=1.21.1,<1.27 
|-- requests-futures >=1.0.0,<1.1
|   `-- requests >=1.2.0 
|       |-- certifi >=2017.4.17 
|       |-- charset-normalizer >=2,<3 
|       |-- idna >=2.5,<4 
|       `-- urllib3 >=1.21.1,<1.27 
|-- stringcase >=1.2,<1.3
|-- tqdm >=4.41,<4.70
|   `-- colorama * 
`-- urllib3 >=1.26.0
urszulajaczewska commented 1 year ago

Hi @aksakalli this will be resolved with this Thursday release

aksakalli commented 1 year ago

Hi @aksakalli this will be resolved with this Thursday release

Is there a fix implemented alread? I don't see any PRs.

apiotrowskiMicroStrategy commented 1 year ago

This repository is for final product release only and do not have any development PRs in it as those are done internally.

released new version of the app can be found here: https://pypi.org/project/mstrio-py/ And this is the PR that merged the release changes

dshvedchenko commented 9 months ago

Hi, from up-to-date versions still no idea how to install mstrio-py without jupyter related dependencies. is there any hidden key or etc ?

apiotrowskiMicroStrategy commented 9 months ago

Hi @dshvedchenko

There is no way to install it without frontend-related dependencies.

If you wish to have mstrio-py explicitly without Connector Jupyter part (the frontend) you would need to build the package locally yourself.

Fortunately, we have everything for you prepared:

  1. git clone this repo locally
  2. Remove pyproject.toml and rename pyproject-backend.toml to pyproject.toml
  3. pip install . instead of installing from PyPi

Hopefully this helps

mstrpr commented 9 months ago

@apiotrowskiMicroStrategy This doesn't work because pyproject-backend.toml needs requirements-backend.txt file, which is missing from the repository.