nbappinator


Namenbappinator JSON
Version 0.1.6 PyPI version JSON
download
home_pageNone
SummaryJupyter Notebook Application Builder
upload_time2024-05-07 22:48:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![PyPI Version](https://badge.fury.io/py/nbappinator.svg)](https://pypi.python.org/pypi/nbappinator)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/nbappinator/badges/version.svg)](https://anaconda.org/conda-forge/nbappinator)
[![Tests](https://github.com/iqmo-org/nbappinator/actions/workflows/build_release.yml/badge.svg)](https://github.com/iqmo-org/nbappinator/actions/workflows/build_release.yml)
[![Tests](https://github.com/iqmo-org/nbappinator/actions/workflows/test_coverage.yml/badge.svg)](https://github.com/iqmo-org/nbappinator/actions/workflows/test_coverage.yml)

<!--[![Coverage badge](https://raw.githubusercontent.com/iqmo-org/nbappinator/python-coverage-comment-action-data/badge.svg)](https://htmlpreview.github.io/?https://github.com/iqmo-org/nbappinator/blob/python-coverage-comment-action-data/htmlcov/index.html)-->

[![Coverage badge2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/iqmo-org/nbappinator/python-coverage-comment-action-data/endpoint.json)](https://htmlpreview.github.io/?https://github.com/iqmo-org/nbappinator/blob/python-coverage-comment-action-data/htmlcov/index.html)

# Introduction

nbappinator streamlines Jupyter and Voila app development through a structured, opinionated framework for UI construction. Adding a button to a page is as simple as using app.page[0].add_button(...).

nbappinator has three goals:

- Simplify UI development for Notebook developers by reducing the surface area of APIs to learn.
- Abstract the underlying UI components, allowing nbappinator to plug in different frameworks to achieve equivalent behavior.
- Provide a foundation to develop reusable and portable themes to improve app styling.

# Example

<!--![Example](readme_example.png)-->

# Getting Started

```py
import nbappinator as nbapp

def my_action(component, action, args, app: nbapp.UiModel, caller: str):
    with app.messages:
        print("This message will be written to the Messages footer")
        app.get_page(0).add_textstatic("This is some text")

def choose_action(component, action, args, app: nbapp.UiModel, caller: str):
    with app.messages:
        chosen_value = app.get_values(caller)
        print(f"You chose {chosen_value}")
        app.get_page(1).add_textstatic(f"You chose {chosen_value}")

# Create a Tabbed UI comprised of three sections:
# "Config" Header,  Tabbed Pages: "First Tab" and "Second Tab", and a "Messages" Footer
myapp = nbapp.TabbedUiModel(pages=["First Tab", "Second Tab"], log_footer = "Messages", headers=["Config"])
myapp.get_page("Config").add_textstatic("This is static text in the Config section of the page. You could add global settings, buttons and other widgets here.")

# Add a button to First Tab
myapp.get_page(0).add_textstatic("This is the first tab")
myapp.get_page(0).add_button(name="but1", label="Some button", action=my_action)
myapp.get_page(0).add_textstatic("Click the button")

# Add a dropdown selection to Second Tab
myapp.get_page(1).add_select(name="choose1", label="Choose A Number", options=list(range(10)), action=choose_action)

# Render the app:
myapp.display()
```

# Deployment and BQuant

nbappinator was originally designed to simplify developing applications within Bloomberg's BQuant environment, which provides a managed but locked down Jupyter environment with a Voila-based deployment of applications.

# Acknowledgements

nbappinator builds on some great projects that provide useful building blocks in Jupyter, which themselves build on other great web technologies. At the same time, nbappinator is implementation agnostic - a core goal is to allow any of these components to be swapped out.

[ipyvuetify](https://ipyvuetify.readthedocs.io/en/latest/) provides the underlying UI widgets, bringing modern VUE components to Jupyter.

[AG Grid](https://ag-grid.com/) is an excellent javascript grid library, which [ipyaggrid](https://github.com/widgetti/ipyaggrid) provides as an Jupyter extension.

[Plotly](https://plotly.com/) is given first class support, although any matplotlib charting library works, such as Seaborn.

This all builds on [Jupyter](https://jupyter.org/) and [ipywidgets](https://ipywidgets.readthedocs.io/en/stable/).

# Testing Notes

A significant portion of the tests are Notebook smoketests designed to exercise the code base in its entirety. The coverage report primarily reflects the percentage of the code base that the Notebooks exercise: but manual verification of the Notebook behavior is still required.

Some assertions are baked into the Notebooks, but largely its intended to ensure that all the features are exercised.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nbappinator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Paul T <paul@iqmo.com>",
    "keywords": null,
    "author": null,
    "author_email": "Paul T <paul@iqmo.com>",
    "download_url": "https://files.pythonhosted.org/packages/32/0b/59c0aa6b86c48b796621f8eac97f0ae0d4de2de92635d460335c9f89e1b1/nbappinator-0.1.6.tar.gz",
    "platform": null,
    "description": "[![PyPI Version](https://badge.fury.io/py/nbappinator.svg)](https://pypi.python.org/pypi/nbappinator)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/nbappinator/badges/version.svg)](https://anaconda.org/conda-forge/nbappinator)\n[![Tests](https://github.com/iqmo-org/nbappinator/actions/workflows/build_release.yml/badge.svg)](https://github.com/iqmo-org/nbappinator/actions/workflows/build_release.yml)\n[![Tests](https://github.com/iqmo-org/nbappinator/actions/workflows/test_coverage.yml/badge.svg)](https://github.com/iqmo-org/nbappinator/actions/workflows/test_coverage.yml)\n\n<!--[![Coverage badge](https://raw.githubusercontent.com/iqmo-org/nbappinator/python-coverage-comment-action-data/badge.svg)](https://htmlpreview.github.io/?https://github.com/iqmo-org/nbappinator/blob/python-coverage-comment-action-data/htmlcov/index.html)-->\n\n[![Coverage badge2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/iqmo-org/nbappinator/python-coverage-comment-action-data/endpoint.json)](https://htmlpreview.github.io/?https://github.com/iqmo-org/nbappinator/blob/python-coverage-comment-action-data/htmlcov/index.html)\n\n# Introduction\n\nnbappinator streamlines Jupyter and Voila app development through a structured, opinionated framework for UI construction. Adding a button to a page is as simple as using app.page[0].add_button(...).\n\nnbappinator has three goals:\n\n- Simplify UI development for Notebook developers by reducing the surface area of APIs to learn.\n- Abstract the underlying UI components, allowing nbappinator to plug in different frameworks to achieve equivalent behavior.\n- Provide a foundation to develop reusable and portable themes to improve app styling.\n\n# Example\n\n<!--![Example](readme_example.png)-->\n\n# Getting Started\n\n```py\nimport nbappinator as nbapp\n\ndef my_action(component, action, args, app: nbapp.UiModel, caller: str):\n    with app.messages:\n        print(\"This message will be written to the Messages footer\")\n        app.get_page(0).add_textstatic(\"This is some text\")\n\ndef choose_action(component, action, args, app: nbapp.UiModel, caller: str):\n    with app.messages:\n        chosen_value = app.get_values(caller)\n        print(f\"You chose {chosen_value}\")\n        app.get_page(1).add_textstatic(f\"You chose {chosen_value}\")\n\n# Create a Tabbed UI comprised of three sections:\n# \"Config\" Header,  Tabbed Pages: \"First Tab\" and \"Second Tab\", and a \"Messages\" Footer\nmyapp = nbapp.TabbedUiModel(pages=[\"First Tab\", \"Second Tab\"], log_footer = \"Messages\", headers=[\"Config\"])\nmyapp.get_page(\"Config\").add_textstatic(\"This is static text in the Config section of the page. You could add global settings, buttons and other widgets here.\")\n\n# Add a button to First Tab\nmyapp.get_page(0).add_textstatic(\"This is the first tab\")\nmyapp.get_page(0).add_button(name=\"but1\", label=\"Some button\", action=my_action)\nmyapp.get_page(0).add_textstatic(\"Click the button\")\n\n# Add a dropdown selection to Second Tab\nmyapp.get_page(1).add_select(name=\"choose1\", label=\"Choose A Number\", options=list(range(10)), action=choose_action)\n\n# Render the app:\nmyapp.display()\n```\n\n# Deployment and BQuant\n\nnbappinator was originally designed to simplify developing applications within Bloomberg's BQuant environment, which provides a managed but locked down Jupyter environment with a Voila-based deployment of applications.\n\n# Acknowledgements\n\nnbappinator builds on some great projects that provide useful building blocks in Jupyter, which themselves build on other great web technologies. At the same time, nbappinator is implementation agnostic - a core goal is to allow any of these components to be swapped out.\n\n[ipyvuetify](https://ipyvuetify.readthedocs.io/en/latest/) provides the underlying UI widgets, bringing modern VUE components to Jupyter.\n\n[AG Grid](https://ag-grid.com/) is an excellent javascript grid library, which [ipyaggrid](https://github.com/widgetti/ipyaggrid) provides as an Jupyter extension.\n\n[Plotly](https://plotly.com/) is given first class support, although any matplotlib charting library works, such as Seaborn.\n\nThis all builds on [Jupyter](https://jupyter.org/) and [ipywidgets](https://ipywidgets.readthedocs.io/en/stable/).\n\n# Testing Notes\n\nA significant portion of the tests are Notebook smoketests designed to exercise the code base in its entirety. The coverage report primarily reflects the percentage of the code base that the Notebooks exercise: but manual verification of the Notebook behavior is still required.\n\nSome assertions are baked into the Notebooks, but largely its intended to ensure that all the features are exercised.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Jupyter Notebook Application Builder",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/iqmo-org/nbappinator",
        "Issues": "https://github.com/iqmo-org/nbappinator/issues",
        "Repository": "https://github.com/iqmo-org/nbappinator"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6bf518a0c3d9d39cea59baed6f16abd53ff9d078d5af941e1e8dad25741804b4",
                "md5": "6c872b73206248976a422bfd8e412dd0",
                "sha256": "9fc9c4c90c1479528ad8500c05d417878c07641822952a9430f12acf5cd3a368"
            },
            "downloads": -1,
            "filename": "nbappinator-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c872b73206248976a422bfd8e412dd0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 16700,
            "upload_time": "2024-05-07T22:48:58",
            "upload_time_iso_8601": "2024-05-07T22:48:58.056945Z",
            "url": "https://files.pythonhosted.org/packages/6b/f5/18a0c3d9d39cea59baed6f16abd53ff9d078d5af941e1e8dad25741804b4/nbappinator-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "320b59c0aa6b86c48b796621f8eac97f0ae0d4de2de92635d460335c9f89e1b1",
                "md5": "0991bde1ccdf46937f56ffff39d08185",
                "sha256": "dc9d3822d7e99f103958d01ddaff12c728f5c1893be9f4878d8858c6e0f8eec5"
            },
            "downloads": -1,
            "filename": "nbappinator-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "0991bde1ccdf46937f56ffff39d08185",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 18149,
            "upload_time": "2024-05-07T22:48:59",
            "upload_time_iso_8601": "2024-05-07T22:48:59.741174Z",
            "url": "https://files.pythonhosted.org/packages/32/0b/59c0aa6b86c48b796621f8eac97f0ae0d4de2de92635d460335c9f89e1b1/nbappinator-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-07 22:48:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iqmo-org",
    "github_project": "nbappinator",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "nbappinator"
}
        
Elapsed time: 0.25999s