mercury-dev


Namemercury-dev JSON
Version 2.3.11 PyPI version JSON
download
home_pagehttps://github.com/mljar/mercury
SummaryTurn Jupyter Notebook to Web App and share with non-technical users
upload_time2023-08-31 09:45:25
maintainerMLJAR Sp. z o.o.
docs_urlNone
authorMLJAR Sp. z o.o.
requires_python>=3.8
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/main.png#gh-light-mode-only" width="100%" />  
</p>
<p align="center">
  <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/main_black.png#gh-dark-mode-only" width="100%" />  
</p>

[![Tests](https://github.com/mljar/mercury/actions/workflows/run-tests.yml/badge.svg)](https://github.com/mljar/mercury/actions/workflows/run-tests.yml)
[![PyPI version](https://badge.fury.io/py/mercury.svg)](https://badge.fury.io/py/mercury)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/mercury.svg)](https://pypi.python.org/pypi/mercury/)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/mljar-mercury/badges/license.svg)](https://anaconda.org/conda-forge/mljar-mercury)

# Build Web Apps in Jupyter Notebook

Mercury allows you to add interactive widgets in Python notebooks, so you can share notebooks as web applications. Forget about rewriting notebooks to web frameworks just to share your results. Mercury offers a set of widgets with simple re-execution of cells.

You can build with Mercury:
- Turn your notebook into beautiful [Web Apps](https://runmercury.com/tutorials/web-app-python-jupyter-notebook/),
- Create interactive [Presentations](https://runmercury.com/tutorials/presentation-python-jupyter-notebook/) with widgets, you can recompute slides during the show,
- Share notebooks as static [Websites](https://runmercury.com/tutorials/website-python-jupyter-notebook/),

- Build data-rich [Dashboards](https://runmercury.com/tutorials/dashboard-python-jupyter-notebook/) with widgets,
- Create [Reports](https://runmercury.com/tutorials/report-python-jupyter-notebook/) with PDF exports, automatic scheduling, and email notifications (coming soon),
- Serve Python notebooks as [REST API](https://runmercury.com/tutorials/rest-api-python-jupyter-notebook/) endpoints (coming soon).

 <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/What_to_build.png#gh-light-mode-only" width="100%" />  
</p>
 <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/What_to_build_black.png#gh-dark-mode-only" width="100%" />  
</p>

Mercury features:
- add widgets with Python code - no frontend experience needed!
- hide or show the notebook's code,
- export executed notebook to PDF or HTML,
- share multiple notebooks - no limits!
- embed notebook on any website,
- easy file upload and download from the notebook,
- add authentication to notebooks (coming soon),
- schedule automatic notebook execution (coming soon).

## Widgets

Mercury provides multiple widgets. There are 3 types of widgets:
- [Input widgets](https://runmercury.com/docs/input-widgets/) are components that will appear in the sidebar when running the notebook in Mercury. They can be used to provide user input or trigger action in the notebook.
- [Output widgets](https://runmercury.com/docs/output-widgets/) help present notebook results to the user and control execution flow.
- [Custom Widgets](https://runmercury.com/docs/custom-widgets/) - you can use many custom widgets, for example, PyDeck, and Pivot Tables.
 <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/widgets3.png#gh-light-mode-only" width="100%" />  
</p>
 <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/widgets_black.png#gh-dark-mode-only" width="100%" />  
</p>
## Integrations
 
Mercury works with virtually every Python package!
Among the most important are machine learning libraries such as Scikit-Learn, Pandas, and Seaborn or visualization libraries: Plotly, matplotlib, Vega-Altair, and Ipyvizzu.
 <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/Integrations.png#gh-light-mode-only" width="100%" />  
</p>
 <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/Integrations_black.png#gh-dark-mode-only" width="100%" />  
</p>

## Example

Simple code example that creates a widget and displays its value. You can interact with a widget in the Jupyter Notebook. Its value will be updated. However, to see the update in other cells you need to **manually execute** them.

Import package:
```python
import mercury as mr
```

Create a [`Text`](https://runmercury.com/docs/input-widgets/text/) widget:
```python
name = mr.Text(value="Piotr", label="What is your name?")
```

Print widget value:
```python
print(f"Hello {name.value}")
```

#### Code in Jupyter Notebook

<p align="center">
<kbd>
<img 
    alt="Web App from Notebook"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/hello-world-notebook-ola.png"  />  
</kbd>
</p>

#### Mercury App

Use Mercury to run notebook as web application. **Cells are automatically re-executed** after widget change. Mercury re-executes only cells with widget definition and below it. In the example, cells 2 and 3 are re-executed after widget update. 

<p align="center">
<kbd>
<img 
    alt="Web App from Notebook"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/hello-world-app-ola.gif"  />  
   </kbd>
</p>


## Documentation

📚 Read more about Mercury on [RunMercury.com](https://RunMercury.com).

## Installation

*Compatible with Python 3.7 and higher.*

Install with `pip`:

```
pip install mercury
```

Install with `conda`:

```
conda install -c conda-forge mercury
```


## Demo

Run Mercury with demo notebooks.

```
mercury run demo
```

Please check [127.0.0.1:8000](http://127.0.0.1:8000) to see demo notebooks.

## Deployment

You have several options to deploy the notebook. You can use the self-hosted option where you use [docker-compose](https://runmercury.com/docs/docker-compose/) on a VPS machine or use ngrok. There's also a possibility to use [Hugging Face Spaces](https://runmercury.com/docs/hugging-face/).

 <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/jupyter-notebook-hugging-face.gif" width="100%" />  
</p>

Another option is a Self-hosted commercial where you get access to the deployment dashboard where you manage notebooks and user access. In addition, you have access to user analytics; you can freely customize the style of your application. You benefit from private forks and email support.

The third option is to use [Mercury Cloud](https://runmercury.com/docs/cloud/). It's the easiest way to share notebooks online. You will be able to create a website with a few clicks.
 <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/Deployment.png#gh-light-mode-only" width="100%" />  
</p>
 <img 
    alt="Mercury convert Jupyter Notebook to Web App"
    src="https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/Deployment_black.png#gh-dark-mode-only" width="100%" />  
</p>


## Mercury with your notebooks

To run Mercury with your notebook, please execute the following:

```
mercury run
```

The command should be run in the same directory as notebooks. You can change code in Jupyter Notebook, and Mercury will **instantly** update web app.



## Mercury License

Mercury is released with AGPL v3 license.

Looking for dedicated support, a commercial-friendly license, and more features? The Mercury Pro is for you. Please see the details at [our website](https://runmercury.com/pricing/).
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mljar/mercury",
    "name": "mercury-dev",
    "maintainer": "MLJAR Sp. z o.o.",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "contact@mljar.com",
    "keywords": "",
    "author": "MLJAR Sp. z o.o.",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/6e/71/34e60c9cd74252e45d597d6924926c55110628a892d02733472aeebb3a39/mercury-dev-2.3.11.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/main.png#gh-light-mode-only\" width=\"100%\" />  \n</p>\n<p align=\"center\">\n  <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/main_black.png#gh-dark-mode-only\" width=\"100%\" />  \n</p>\n\n[![Tests](https://github.com/mljar/mercury/actions/workflows/run-tests.yml/badge.svg)](https://github.com/mljar/mercury/actions/workflows/run-tests.yml)\n[![PyPI version](https://badge.fury.io/py/mercury.svg)](https://badge.fury.io/py/mercury)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/mercury.svg)](https://pypi.python.org/pypi/mercury/)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/mljar-mercury/badges/license.svg)](https://anaconda.org/conda-forge/mljar-mercury)\n\n# Build Web Apps in Jupyter Notebook\n\nMercury allows you to add interactive widgets in Python notebooks, so you can share notebooks as web applications. Forget about rewriting notebooks to web frameworks just to share your results. Mercury offers a set of widgets with simple re-execution of cells.\n\nYou can build with Mercury:\n- Turn your notebook into beautiful [Web Apps](https://runmercury.com/tutorials/web-app-python-jupyter-notebook/),\n- Create interactive [Presentations](https://runmercury.com/tutorials/presentation-python-jupyter-notebook/) with widgets, you can recompute slides during the show,\n- Share notebooks as static [Websites](https://runmercury.com/tutorials/website-python-jupyter-notebook/),\n\n- Build data-rich [Dashboards](https://runmercury.com/tutorials/dashboard-python-jupyter-notebook/) with widgets,\n- Create [Reports](https://runmercury.com/tutorials/report-python-jupyter-notebook/) with PDF exports, automatic scheduling, and email notifications (coming soon),\n- Serve Python notebooks as [REST API](https://runmercury.com/tutorials/rest-api-python-jupyter-notebook/) endpoints (coming soon).\n\n <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/What_to_build.png#gh-light-mode-only\" width=\"100%\" />  \n</p>\n <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/What_to_build_black.png#gh-dark-mode-only\" width=\"100%\" />  \n</p>\n\nMercury features:\n- add widgets with Python code - no frontend experience needed!\n- hide or show the notebook's code,\n- export executed notebook to PDF or HTML,\n- share multiple notebooks - no limits!\n- embed notebook on any website,\n- easy file upload and download from the notebook,\n- add authentication to notebooks (coming soon),\n- schedule automatic notebook execution (coming soon).\n\n## Widgets\n\nMercury provides multiple widgets. There are 3 types of widgets:\n- [Input widgets](https://runmercury.com/docs/input-widgets/) are components that will appear in the sidebar when running the notebook in Mercury. They can be used to provide user input or trigger action in the notebook.\n- [Output widgets](https://runmercury.com/docs/output-widgets/) help present notebook results to the user and control execution flow.\n- [Custom Widgets](https://runmercury.com/docs/custom-widgets/) - you can use many custom widgets, for example, PyDeck, and Pivot Tables.\n <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/widgets3.png#gh-light-mode-only\" width=\"100%\" />  \n</p>\n <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/widgets_black.png#gh-dark-mode-only\" width=\"100%\" />  \n</p>\n## Integrations\n \nMercury works with virtually every Python package!\nAmong the most important are machine learning libraries such as Scikit-Learn, Pandas, and Seaborn or visualization libraries: Plotly, matplotlib, Vega-Altair, and Ipyvizzu.\n <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/Integrations.png#gh-light-mode-only\" width=\"100%\" />  \n</p>\n <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/Integrations_black.png#gh-dark-mode-only\" width=\"100%\" />  \n</p>\n\n## Example\n\nSimple code example that creates a widget and displays its value. You can interact with a widget in the Jupyter Notebook. Its value will be updated. However, to see the update in other cells you need to **manually execute** them.\n\nImport package:\n```python\nimport mercury as mr\n```\n\nCreate a [`Text`](https://runmercury.com/docs/input-widgets/text/) widget:\n```python\nname = mr.Text(value=\"Piotr\", label=\"What is your name?\")\n```\n\nPrint widget value:\n```python\nprint(f\"Hello {name.value}\")\n```\n\n#### Code in Jupyter Notebook\n\n<p align=\"center\">\n<kbd>\n<img \n    alt=\"Web App from Notebook\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/hello-world-notebook-ola.png\"  />  \n</kbd>\n</p>\n\n#### Mercury App\n\nUse Mercury to run notebook as web application. **Cells are automatically re-executed** after widget change. Mercury re-executes only cells with widget definition and below it. In the example, cells 2 and 3 are re-executed after widget update. \n\n<p align=\"center\">\n<kbd>\n<img \n    alt=\"Web App from Notebook\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/hello-world-app-ola.gif\"  />  \n   </kbd>\n</p>\n\n\n## Documentation\n\n\ud83d\udcda Read more about Mercury on [RunMercury.com](https://RunMercury.com).\n\n## Installation\n\n*Compatible with Python 3.7 and higher.*\n\nInstall with `pip`:\n\n```\npip install mercury\n```\n\nInstall with `conda`:\n\n```\nconda install -c conda-forge mercury\n```\n\n\n## Demo\n\nRun Mercury with demo notebooks.\n\n```\nmercury run demo\n```\n\nPlease check [127.0.0.1:8000](http://127.0.0.1:8000) to see demo notebooks.\n\n## Deployment\n\nYou have several options to deploy the notebook. You can use the self-hosted option where you use [docker-compose](https://runmercury.com/docs/docker-compose/) on a VPS machine or use ngrok. There's also a possibility to use [Hugging Face Spaces](https://runmercury.com/docs/hugging-face/).\n\n <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/jupyter-notebook-hugging-face.gif\" width=\"100%\" />  \n</p>\n\nAnother option is a Self-hosted commercial where you get access to the deployment dashboard where you manage notebooks and user access. In addition, you have access to user analytics; you can freely customize the style of your application. You benefit from private forks and email support.\n\nThe third option is to use [Mercury Cloud](https://runmercury.com/docs/cloud/). It's the easiest way to share notebooks online. You will be able to create a website with a few clicks.\n <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/Deployment.png#gh-light-mode-only\" width=\"100%\" />  \n</p>\n <img \n    alt=\"Mercury convert Jupyter Notebook to Web App\"\n    src=\"https://raw.githubusercontent.com/mljar/visual-identity/main/mercury/readme/Deployment_black.png#gh-dark-mode-only\" width=\"100%\" />  \n</p>\n\n\n## Mercury with your notebooks\n\nTo run Mercury with your notebook, please execute the following:\n\n```\nmercury run\n```\n\nThe command should be run in the same directory as notebooks. You can change code in Jupyter Notebook, and Mercury will **instantly** update web app.\n\n\n\n## Mercury License\n\nMercury is released with AGPL v3 license.\n\nLooking for dedicated support, a commercial-friendly license, and more features? The Mercury Pro is for you. Please see the details at [our website](https://runmercury.com/pricing/).",
    "bugtrack_url": null,
    "license": "",
    "summary": "Turn Jupyter Notebook to Web App and share with non-technical users",
    "version": "2.3.11",
    "project_urls": {
        "Homepage": "https://github.com/mljar/mercury"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e7134e60c9cd74252e45d597d6924926c55110628a892d02733472aeebb3a39",
                "md5": "862468cbd16e4848f17a30ad0d854db9",
                "sha256": "bda02c7b1b26e1b7d5973f9b4e98418964dcb6e5df8878697446238f0d6f9f61"
            },
            "downloads": -1,
            "filename": "mercury-dev-2.3.11.tar.gz",
            "has_sig": false,
            "md5_digest": "862468cbd16e4848f17a30ad0d854db9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 2586325,
            "upload_time": "2023-08-31T09:45:25",
            "upload_time_iso_8601": "2023-08-31T09:45:25.690843Z",
            "url": "https://files.pythonhosted.org/packages/6e/71/34e60c9cd74252e45d597d6924926c55110628a892d02733472aeebb3a39/mercury-dev-2.3.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-31 09:45:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mljar",
    "github_project": "mercury",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mercury-dev"
}
        
Elapsed time: 0.10747s