Skip to main content

A reliable popup/modal solution for Jupyter notebooks

Project description

jupyter-popup

A simple and reliable popup/modal solution for Jupyter notebooks that works in remote environments.

Installation

pip install jupyter-popup

Usage

from jupyter_popup import create_popup

# Simple usage
create_popup("This is a test message", "Title")

# With HTML content
html_content = """
<div style='line-height: 1.6'>
    <h3>Important Information</h3>
    <p>This is formatted content.</p>
</div>
"""
create_popup(html_content, "HTML Content")

# If using with IPython display and button call backs
import ipywidgets as widgets
from IPython.display import display
from jupyter_popup import create_popup

output = widgets.Output()

def message():
    create_popup("My awesome pop up")

def test_popup():
    with output:
        message()

test_button = widgets.Button(description="Test")
test_button.on_click(lambda b: test_popup())

display(test_button)
display(output)

Features

  • True fixed positioning that works in remote Jupyter environments
  • Proper handling of long content with scrolling
  • Works with HTML content
  • Doesn't interfere with notebook layout
  • Proper contrast and visibility in both light and dark themes
  • Version 0.1.2 works within a IPython app with button callbacks

Requirements

  • Python ≥ 3.6
  • IPython ≥ 7.0.0

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_popup-0.1.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyter_popup-0.1.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_popup-0.1.3.tar.gz.

File metadata

  • Download URL: jupyter_popup-0.1.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for jupyter_popup-0.1.3.tar.gz
Algorithm Hash digest
SHA256 991f90a3afdd53d476d1b9bfed60018eeb41440209af876e21c255bc546d4e2f
MD5 1b09c0545b0163875029be7fd17d004b
BLAKE2b-256 2de9c0813cee97896ecf4316dd80c9be17364eab6b6baa2958aaf94595359a47

See more details on using hashes here.

File details

Details for the file jupyter_popup-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: jupyter_popup-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for jupyter_popup-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cced2024485aa46430d4ef1102613cce10bf8d67b62f6bc1fb9dda546c1fc7aa
MD5 53445532be2c094971c96b75c7ace9b2
BLAKE2b-256 d508c2767a2256d95bc0f3ad76856e2ac4490375fc6aca0af5b1a5cd1bf4065d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page