{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# jupyterlab-omnisci\n\nConnect to OmniSci, query their databases, and render the OmniSci-flavored Vega specification,\nall within JupyterLab.\n\n[![](https://img.shields.io/pypi/v/jupyterlab-omnisci.svg?style=flat-square)](https://pypi.python.org/pypi/jupyterlab-omnisci) [![](https://img.shields.io/npm/v/jupyterlab-omnisci.svg?style=flat-square)](https://www.npmjs.com/package/jupyterlab-omnisci)\n\n[![binder logo](https://beta.mybinder.org/badge.svg)](https://mybinder.org/v2/gh/Quansight/jupyterlab-omnisci/master?urlpath=lab/tree/notebooks/4.%20Extract%20Use%20Cases%20-%20VL%20examples.ipynb)\n\n![example](./screenshot.png)\n\n## Installation\n\nFirst, install JupyterLab and `pymapd` as well the `jupyterlab-omnisci` Python package:\n\n```bash\nconda install -c conda-forge pymapd nodejs\n\npip install jupyterlab-omnisci\n```\n\nThen install the `jupyterlab-omnisci` JupyterLab extension:\n\n```bash\njupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build\njupyter labextension install jupyterlab-omnisci\n```\n\nThen launch JupyterLab:\n\n```bash\njupyter lab\n```\n\n## Executing SQL Queries\n\nYou can open an OmiSci SQL editor by going to **File > New > OmniSci SQL Editor** or clicking the icon on the launcher.\n\nInput your database credentials by clicking on the blue icon on the right:\n\n![](./sqlcon.png)\n\nThen you can input an SQL query and hit the triangle to see the results:\n\n![](./sql.png)\n\nTo set a default connection that will be saved and used for new editors, go to **Settings > Set Default Omnisci Connection...**.\n\n## Getting started with Ibis\n\nOnce you have set a default connection, you can run the **Inject Ibis OmniSci Connection** command to prefil a cell to connect to it with Ibis.\n\n![](./inject-ibis-con.gif)\n\n## Creating Visualizations\n\nCheck out the [introduction notebook](./notebooks/Introduction.ipynb) to see how to use OmniSci within your notebooks [![](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/Quansight/jupyterlab-omnisci/master?urlpath=lab/tree/notebooks/Introduction.ipynb).\n\n## Using session IDs\n\nIn some contexts the user may be coming from another context (such as OmniSci Immerse)\nwhere they already have an authenticated session to the OmniSci databse.\nThis extension provides a way to pass that session information to JupyterLab so that they\nmay continue with their data analysis uninterrupted.\nThere are some steps required to set this up, however:\n\n#### 1. Enable the session manager server extension.\n\nWe must an extension to the JupyterLab server that knows how to find the session\ninformation, which can then be passed to the frontend application.\nOnce the package `jupyterlab_omnisci` is installed, the extension can be enabled by running\n\n```bash\njupyter serverextension enable --sys-prefix jupyterlab_omnisci.serverextension\n```\n\nIf this works, you should not see any error messages, and you can verify\nit is enabled by running\n\n```bash\njupyter serverextension list\n```\n\n#### 2. Set up the user's environment\n\nThe user environment should be prepared for the extension to get the necessary information.\nThis setup could occur during a container launch, or after spawning the Jupyter server process.\nBy default, the extension looks for the protocol, host, and port of the OmniSci server\nin environment variables.\nThe names of these variables may be configured in the user's `jupyter_notebook_config.py`:\n\n```python\nc.OmniSciSessionManager.protocol = 'OMNISCI_PROTOCOL'\nc.OmniSciSessionManager.host = 'OMNISCI_HOST'\nc.OmniSciSessionManager.port = 'OMNISCI_PORT'\n```\n\nThe session ID is more ephemeral. The extension looks for that information in a file on disk.\nThis file should be plain text, and contain the session ID and nothing else.\nThe location of this file _must_ be configured in the `jupyter_notebook_config.py` file,\notherwise it won't know where to find the session:\n\n```python\nc.OmniSciSessionManager.session_file = '/path/to/session/file'\n```\n\n#### 3. Directing the user to the session\n\nOnce the server extension is enabled, and the user's environment is configured,\nit should be ready to use.\nYou can direct the user to a workspace that is ready-to-use by sending them\nto this url (where `BASE_URL` is the server root):\n\n```\n{BASE_URL}/lab?omnisci&reset\n```\n\nThe `omnisci` URL parameter launches a few activities with the session ID that should be ready-to-go.\nThe `reset` URL parameter clears any existing workspace that would try to load,\nsince we are replacing it with our own.\nIf everything has worked, you should see something like the following:\n\n![session](./session-workspace.png)\n\n#### 4. Advanced configuration\n\nThe `OmniSciSessionManager` is the default provider of session IDs,\nbut this can be configured and replaced by other implementations.\nFor instance, if you want to get connection data from another location\nother than environment variables and local files, you can replace it with your\nown implementation.\n\nTo do this, you need to write a new session manager that implements the interface\ngiven in [this](./jupyterlab_omnisci/serverextension/session.py) file,\nand configure the notebook server to use that in the `jupyter_notebook_config.py`:\n\n```python\nc.OmniSciConfig.session_manager = \"your_new_module.YourImplementation\"\n```\n\n## FAQ\n\n1. Something isn't working right. What should I do?\n _[Open an issue!](https://github.com/Quansight/jupyterlab-omnisci/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D+) It's likely not your fault, many of these integrations are new and we need your feedback to understand what use cases are important_.\n\n## Installing from source\n\nTo install from source, run the following in a terminal:\n\n```bash\ngit clone git@github.com:Quansight/jupyterlab-omnisci.git\n\ncd jupyterlab-omnisci\nconda env create -f binder/environment.yml\nconda activate jupyterlab-omnisci\n\njlpm install\njlpm run build\n\njupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build\njupyter labextension install .\njupyter serverextension enable --sys-prefix jupyterlab_omnisci.serverextension\n```\n\n## Releasing\n\nFirst create a test environment:\n\n```bash\nconda create -n tmp -c conda-forge pymapd nodejs\nconda activate tmp\n```\n\nThen bump the Python version in `setup.py` and upload a test version:\n\n```bash\npip install --upgrade setuptools wheel twine\nrm -rf dist/\npython setup.py sdist bdist_wheel\ntwine upload --repository-url https://test.pypi.org/legacy/ dist/*\n```\n\nInstall the test version in your new environment:\n\n```bash\npip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple jupyterlab_omnisci\n```\n\nNow bump the version for the Javascript package in `package.json`. The run a build,\ncreate a tarball, and install it as a JupyterLab extension:\n\n```bash\nyarn run build\nyarn pack --filename out.tgz\njupyter labextension install @jupyter-widgets/jupyterlab-manager@0.40.x --no-build\njupyter labextension install out.tgz\n```\n\nNow open JupyterLab and run through all the notebooks in `notebooks` to make sure\nthey still render correctly.\n\nNow you can publish the Python package:\n\n```bash\ntwine upload dist/*\n```\n\nAnd publish the node package:\n\n```\nnpm publish out.tgz\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Quansight/jupyterlab-omnisci", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "jupyterlab-omnisci", "package_url": "https://pypi.org/project/jupyterlab-omnisci/", "platform": "", "project_url": "https://pypi.org/project/jupyterlab-omnisci/", "project_urls": { "Homepage": "https://github.com/Quansight/jupyterlab-omnisci" }, "release_url": "https://pypi.org/project/jupyterlab-omnisci/0.12.0/", "requires_dist": [ "altair (>=3.0.1)", "ibis-framework (>=1.1.0)", "ibis-vega-transform (==0.1.0)", "ipywidgets", "jupyterlab (>=1.0.0)", "pymapd (>=0.12.0)", "pyyaml", "vdom", "vega-datasets" ], "requires_python": "", "summary": "Omnisci integration with JupyterLab", "version": "0.12.0" }, "last_serial": 5593471, "releases": { "0.0.8": [ { "comment_text": "", "digests": { "md5": "df1c3360f4684a27e4b18804522be91b", "sha256": "99ee238145c46912773f16be9f3b200c6121391684d84ad43fab17ef372c97f4" }, "downloads": -1, "filename": "jupyterlab_omnisci-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "df1c3360f4684a27e4b18804522be91b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11187, "upload_time": "2018-12-17T16:54:29", "url": "https://files.pythonhosted.org/packages/00/dd/93ed4175422ec9c3f93f882f23b2ccaee271accd33baea8435cafe21f9ef/jupyterlab_omnisci-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "decbbe9764fd0d2923803766489ed099", "sha256": "5bfaffbadcdcb7f519abafb8df3b0d5d18c9d2d46e795cbef46dea06a6a158e0" }, "downloads": -1, "filename": "jupyterlab-omnisci-0.0.8.tar.gz", "has_sig": false, "md5_digest": "decbbe9764fd0d2923803766489ed099", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6423, "upload_time": "2018-12-17T16:54:31", "url": "https://files.pythonhosted.org/packages/58/de/cf3024fc5d4e885ce8ad40faf8f1c1d3c4cf874b2260b2767804d2d7cf59/jupyterlab-omnisci-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "ee031d9911cec873fd449eeff8538f74", "sha256": "c34883c833dc13a909e0cb19183349712285f6c64cd3cf5e915d9395c0f9417d" }, "downloads": -1, "filename": "jupyterlab_omnisci-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "ee031d9911cec873fd449eeff8538f74", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11222, "upload_time": "2018-12-17T17:35:28", "url": "https://files.pythonhosted.org/packages/06/04/8bf912f1667e78a95261c4691aff6ef45a5280897061f865443f29d7afe0/jupyterlab_omnisci-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5bb4cf41c1ba9a3df9f500d883b17bbe", "sha256": "3c4f3860fa075bb0ad83a12cba1328fb675d9936f8a030f5167c54d65e8277ef" }, "downloads": -1, "filename": "jupyterlab-omnisci-0.0.9.tar.gz", "has_sig": false, "md5_digest": "5bb4cf41c1ba9a3df9f500d883b17bbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6457, "upload_time": "2018-12-17T17:35:29", "url": "https://files.pythonhosted.org/packages/9f/bf/bb711acd3d6cd7b293a96cb14e16b426a677fc6da734cd79630585d3ae53/jupyterlab-omnisci-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "ca2f220c9d22c43caa196153d22b2205", "sha256": "62dd9190a8b15b85a4cc2bf75ce653e6a0b98acfcce6d77d56e4338db8b5dbaa" }, "downloads": -1, "filename": "jupyterlab_omnisci-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ca2f220c9d22c43caa196153d22b2205", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13474, "upload_time": "2019-02-25T21:25:49", "url": "https://files.pythonhosted.org/packages/28/08/adc707d75801897989b6c64995024743c8e8325c166d86a4d85c4c3310d6/jupyterlab_omnisci-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c799a9c71cf9d9cafa59ca2b2749d257", "sha256": "677b85eb10ee064da5ad4cc6fb086bb5074a7aa5186c13a4d00471e370c79e61" }, "downloads": -1, "filename": "jupyterlab-omnisci-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c799a9c71cf9d9cafa59ca2b2749d257", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8820, "upload_time": "2019-02-25T21:25:50", "url": "https://files.pythonhosted.org/packages/cd/c6/18ca3b0d65473d16a74e9427fda7ae45407af47494b25163e85582e772bd/jupyterlab-omnisci-0.1.0.tar.gz" } ], "0.10.0": [ { "comment_text": "", "digests": { "md5": "d5f60279165370a7f2eb1dd793adf2f8", "sha256": "c6a7c781d68854b4305a7b97d4b691adf43e3d2836058210a275a00d8392fcdd" }, "downloads": -1, "filename": "jupyterlab_omnisci-0.10.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d5f60279165370a7f2eb1dd793adf2f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13488, "upload_time": "2019-06-16T17:44:26", "url": "https://files.pythonhosted.org/packages/03/be/0136debc0c3dfe5c374d8670226af58f73f872b809a7678fb4a1b95cbd81/jupyterlab_omnisci-0.10.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9573c321ebff82c803e2ade2bd0d8787", "sha256": "5f6df2fb6c46cfa21fb8caf8fec0a69b3ff30f4b89ab8983cea97abd74d2bf52" }, "downloads": -1, "filename": "jupyterlab-omnisci-0.10.0.tar.gz", "has_sig": false, "md5_digest": "9573c321ebff82c803e2ade2bd0d8787", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9182, "upload_time": "2019-06-16T17:44:28", "url": "https://files.pythonhosted.org/packages/90/07/c21ece81b9af9577ce3831ed65e09d819832283316abf828c753aaa14a36/jupyterlab-omnisci-0.10.0.tar.gz" } ], "0.11.0": [ { "comment_text": "", "digests": { "md5": "812931c3434ee5dae59344bbbd4a66f9", "sha256": "fa324374fe1eb542749060459814771bdd7485a3353462cab08f2a69aa54ac8d" }, "downloads": -1, "filename": "jupyterlab_omnisci-0.11.0-py3-none-any.whl", "has_sig": false, "md5_digest": "812931c3434ee5dae59344bbbd4a66f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17799, "upload_time": "2019-07-15T14:48:30", "url": "https://files.pythonhosted.org/packages/13/7c/97d387a80fb7a55cb0694aedab5f8144d74ee610d157b2a044e6511087a2/jupyterlab_omnisci-0.11.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "67cd6240dc656311848b6c13d4ede3f5", "sha256": "89299581208d0c108988e9ead889466bc87075335e93ca9747d654cbd0a5d00e" }, "downloads": -1, "filename": "jupyterlab-omnisci-0.11.0.tar.gz", "has_sig": false, "md5_digest": "67cd6240dc656311848b6c13d4ede3f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14481, "upload_time": "2019-07-15T14:48:32", "url": "https://files.pythonhosted.org/packages/15/54/d5e95aa5e67c998dacf9b5de6aa15b2654400f0138f9f144cce129c3f8d2/jupyterlab-omnisci-0.11.0.tar.gz" } ], "0.12.0": [ { "comment_text": "", "digests": { "md5": "bec7f8b77a385610b2f4b2621afa0881", "sha256": "db800b9d77f1624e9119f797eb1619a1bec37c0669af88dd1ba80772229375f6" }, "downloads": -1, "filename": "jupyterlab_omnisci-0.12.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bec7f8b77a385610b2f4b2621afa0881", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21841, "upload_time": "2019-07-27T16:40:52", "url": "https://files.pythonhosted.org/packages/d6/39/aa9fcf42f22fddb6b85344a9453136a406a4c4ee2aa9fcc79fc07be97738/jupyterlab_omnisci-0.12.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "292a1530824419faece2205e3a58736c", "sha256": "946e6a819d35a2e714f80757588c79537d0638764b24df7cd258e6a76296d326" }, "downloads": -1, "filename": "jupyterlab-omnisci-0.12.0.tar.gz", "has_sig": false, "md5_digest": "292a1530824419faece2205e3a58736c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17397, "upload_time": "2019-07-27T16:40:54", "url": "https://files.pythonhosted.org/packages/07/a5/dc6b3d8dc1146cff68733d3539b7c9f0a515d1897ba911c0025834435c47/jupyterlab-omnisci-0.12.0.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "29f9384f734cfeec4cacb5652c397353", "sha256": "7aff7d56e63a4bb45117cf707220600a38962c6ee2f82769913a225c524e5054" }, "downloads": -1, "filename": "jupyterlab_omnisci-0.9.0-py3-none-any.whl", "has_sig": false, "md5_digest": "29f9384f734cfeec4cacb5652c397353", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13478, "upload_time": "2019-05-14T20:31:33", "url": "https://files.pythonhosted.org/packages/6b/92/0a2122f70d16de3b2264e14af0bc67ab0184732ef3a6ef9704c44a0ffeaa/jupyterlab_omnisci-0.9.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b848364ed033a4637cccf1740628626", "sha256": "02d40f04454c79d56de440a864323541145666a1b47b1d417c6c958c43fa1833" }, "downloads": -1, "filename": "jupyterlab-omnisci-0.9.0.tar.gz", "has_sig": false, "md5_digest": "7b848364ed033a4637cccf1740628626", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9181, "upload_time": "2019-05-14T20:31:34", "url": "https://files.pythonhosted.org/packages/42/62/799daf3b6cad313f39378633aa3926bfea9da0a78aece6a5b8b3dc7f239a/jupyterlab-omnisci-0.9.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bec7f8b77a385610b2f4b2621afa0881", "sha256": "db800b9d77f1624e9119f797eb1619a1bec37c0669af88dd1ba80772229375f6" }, "downloads": -1, "filename": "jupyterlab_omnisci-0.12.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bec7f8b77a385610b2f4b2621afa0881", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21841, "upload_time": "2019-07-27T16:40:52", "url": "https://files.pythonhosted.org/packages/d6/39/aa9fcf42f22fddb6b85344a9453136a406a4c4ee2aa9fcc79fc07be97738/jupyterlab_omnisci-0.12.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "292a1530824419faece2205e3a58736c", "sha256": "946e6a819d35a2e714f80757588c79537d0638764b24df7cd258e6a76296d326" }, "downloads": -1, "filename": "jupyterlab-omnisci-0.12.0.tar.gz", "has_sig": false, "md5_digest": "292a1530824419faece2205e3a58736c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17397, "upload_time": "2019-07-27T16:40:54", "url": "https://files.pythonhosted.org/packages/07/a5/dc6b3d8dc1146cff68733d3539b7c9f0a515d1897ba911c0025834435c47/jupyterlab-omnisci-0.12.0.tar.gz" } ] }