{ "info": { "author": "Abhinandan Dubey", "author_email": "abhinandandubey@live.com", "bugtrack_url": null, "classifiers": [], "description": "

\n\n

\n\n# megaclite\n## Resource Manager for JupyterHub, also a moon.\n\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.png?v=103)](https://github.com/alivcor/segraph)\n[![dependencies Status](https://david-dm.org/boennemann/badges/status.svg)](https://github.com/alivcor/segraph)\n[![Build Status](https://travis-ci.org/alivcor/megaclite.svg?branch=master)](https://travis-ci.org/alivcor/megaclite)\n\n

\n\n

\n\n\nMegaclite provides monitoring, auditing & management for JupyterHub.\n\n:octocat: Link to GitHub Repo\n\n## Getting Started\n\nMegaclite provides the following functionalities:\n\n- A small label in the toolbar to display memory utilization (summed across all notebooks) on client side\n- Warning pop-up when user exhausts 75% of his/her memory limit on client-side.\n- Alert pop-up when user crosses his/her memory limit on client-side.\n- Kills kernel/session when user surpasses the limits.\n- Auditing on server-side.\n\nMake sure you have sudospawner up and running.\n\n### Prerequisites\n\nYou will need to have Sudospawner installed on your system. The megaclite extension was built with Python 3.6, and it is NOT made for Python 2.7, so is JupyterHub.\n\n```\npip install megaclite\n```\n\n### Installation\n\nThere are multiple ways to install megaclite on your system:\n\n#### Python Package Index\n\nmegaclite is now available at https://pypi.python.org/pypi/megaclite/0.1\n\n\n\n```\n1. Download the tar/zip from https://pypi.python.org/pypi/megaclite/0.1\n2. Move the package to your desired location / python version, and unzip the archive.\nOptionally, if you have a linux-based machine (Ubuntu/OSX):\n tar xvzf megaclite-0.x.tar.gz -C /path/to/desireddirectory\n3. Migrate to the megaclite folder, and run\n python setup.py install\n```\n\n#### Using pip\n\n```\npip install megaclite\n```\n\nTo upgrade,\n\n```\npip install --upgrade megaclite\n```\n\n\n## Using megaclite\n\nmegaclite bouples BEST with Sudospawner. You need a JupyterHub API Token to use megaclite.\n\n## Create an API token\n\nTo send requests using JupyterHub API, you must pass an API token with\nthe request.\n\nAs of version 0.6.0, the preferred way of\ngenerating an API token is:\n\n```bash\nopenssl rand -hex 32\n```\n\nThis `openssl` command generates a potential token that can then be\nadded to JupyterHub using `.api_tokens` configuration setting in\n`jupyterhub_config.py`.\n\nAlternatively, use the `jupyterhub token` command to generate a token\nfor a specific hub user by passing the 'username':\n\n```bash\njupyterhub token \n```\n\nThis command generates a random string to use as a token and registers\nit for the given user with the Hub's database.\n\nIn JupyterHub version 0.8.0, a TOKEN request page for\ngenerating an API token is available from the JupyterHub user interface:\n\n![Request API TOKEN page](https://github.com/jupyterhub/jupyterhub/raw/master/docs/source/images/token-request.png)\n\n![API TOKEN success page](https://github.com/jupyterhub/jupyterhub/raw/master/docs/source/images/token-request-success.png)\n\n## Add API tokens to the config file\n\nYou may also add a dictionary of API tokens and usernames to the hub's\nconfiguration file, `jupyterhub_config.py` (note that\nthe **key** is the 'secret-token' while the **value** is the 'username'):\n\n```python\nc.JupyterHub.api_tokens = {\n 'secret-token': 'username',\n}\n```\n\n\n## Make the username an admin\n\nThis is required to be able to kill sessions in the event of user surpassing memory limits.\n\n\n```python\nc.JupyterHub.admin_users = {'username'}\n```\n\nNOTE: If you skip this, Megaclite will NOT be able to kill sessions.\n\n## Enabling the extension\n\ninstall both the serverextension and the toolbar button (nbextension) with:\n\n```bash\npip install megaclite\njupyter serverextension enable --py megaclite --sys-prefix\njupyter nbextension install --py megaclite --sys-prefix\njupyter nbextension enable --py megaclite --sys-prefix\n```\n\nYou can check that the install was successful with:\n```bash\njupyter nbextension list\njupyter serverextension list\n```\n\nYou may also enable it from the nbextensions-configurator UI.\n\n## See the magic unleash\n\n

\n\n

\n\n\n## Contributing\n\nYou are welcome to raise issues / send a pull-request.\n\n\n## Authors\n\n* **Abhinandan Dubey** - *@alivcor* - [Human Interaction Lab, Stony Brook University](https://www.cs.stonybrook.edu/~adubey)\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n[![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](https://github.com/alivcor/segraph/#)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alivcor/megaclite", "keywords": "jupyterhub,memory,nbextension,jupyter,extension", "license": "", "maintainer": "", "maintainer_email": "", "name": "megaclite", "package_url": "https://pypi.org/project/megaclite/", "platform": "", "project_url": "https://pypi.org/project/megaclite/", "project_urls": { "Homepage": "https://github.com/alivcor/megaclite" }, "release_url": "https://pypi.org/project/megaclite/0.1/", "requires_dist": null, "requires_python": "", "summary": "Resource Manager for Jupyter. A moon too.", "version": "0.1" }, "last_serial": 3747216, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6675c542410137545534f34572c16fda", "sha256": "9a0679d3a97dd852e1e7455b360f6bd59a581d4756908f0a61baf69fb1874cde" }, "downloads": -1, "filename": "megaclite-0.1.tar.gz", "has_sig": false, "md5_digest": "6675c542410137545534f34572c16fda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 120038, "upload_time": "2018-04-09T01:47:11", "url": "https://files.pythonhosted.org/packages/b5/6d/34a7ee9f1d7f7df12d0ff283441f51e01746a9c4abe93b750138cf79fee2/megaclite-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6675c542410137545534f34572c16fda", "sha256": "9a0679d3a97dd852e1e7455b360f6bd59a581d4756908f0a61baf69fb1874cde" }, "downloads": -1, "filename": "megaclite-0.1.tar.gz", "has_sig": false, "md5_digest": "6675c542410137545534f34572c16fda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 120038, "upload_time": "2018-04-09T01:47:11", "url": "https://files.pythonhosted.org/packages/b5/6d/34a7ee9f1d7f7df12d0ff283441f51e01746a9c4abe93b750138cf79fee2/megaclite-0.1.tar.gz" } ] }