🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

jupyter-popup

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jupyter-popup

A reliable popup/modal solution for Jupyter notebooks

0.1.3
PyPI
Maintainers
1

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts