You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

flyalert

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flyalert

Custom animated alerts and dialogs for PyQt5.

2.0.0
pipPyPI
Maintainers
1

FlyAlert — Custom Animated Alerts for PyQt5

FlyAlert is a customizable alert/dialog window component for PyQt5 applications.
It provides a sleek, animated, frameless UI with optional shadow effects, buttons, and icon types.
It also includes a compact version (MinimalFlyAlert) for quick notifications that disappear automatically.

🚀 Features

  • 🔘 Modal alert with fade-in/out animation
  • ✅ Supports multiple icon types: success, error, warning, info, question
  • 🎨 Customizable title, message, and buttons (Confirm / Cancel / Info)
  • 🧭 Flexible positioning (center, top-left, top-right, bottom-left, bottom-right)
  • 🪟 Frameless and translucent window with drop shadow
  • MinimalFlyAlert supports auto-close timer and close button

📦 Requirements

  • Python 3.6+
  • PyQt5

Install with pip:

pip install PyQt5

Installation

🧪 Example Usage

from PyQt5.QtWidgets import QApplication
from flyalert import FlyAlert, MinimalFlyAlert  # Save the classes as flyalert.py

app = QApplication([])

# Full alert
alert = FlyAlert({
    'icon': 'success',
    'title': 'Success!',
    'message': 'Your action was completed successfully.',
    'ConfirmButton': True,
    'ConfirmButtonText': 'Okay',
    'ConfirmButtonColor': '#4CAF50',
    'ConfirmButtonClicked': lambda: print('Confirmed!')
})
alert.show()

# Compact alert
# alert = MinimalFlyAlert({
#     'icon': 'info',
#     'message': 'This will disappear in 5 seconds.',
#     'position': 'top-right',
#     'auto_close_time': 5000
# })
# alert.show()

app.exec_()

⚙️ Configuration Options

KeyTypeDescriptionDefault
iconstrIcon type: success, error, warning, info, question"info"
titlestrDialog title text"Default Title"
messagestrDialog message text"Default Message"
positionstrWindow position: top-left, top-right, bottom-left, etc."center"
ConfirmButtonboolShow confirm buttonTrue
ConfirmButtonTextstrText of confirm button"Confirm Button"
ConfirmButtonColorstrBackground color of confirm button"green"
ConfirmButtonClickedfunctionCallback function when confirm is clickedself.accept()
CancelButtonboolShow cancel buttonFalse
CancelButtonTextstrText of cancel button"Cancel Button"
CancelButtonColorstrBackground color of cancel button"red"
CancelButtonClickedfunctionCallback function when cancel is clickedself.reject()
InfoButtonboolShow info buttonFalse
InfoButtonTextstrText of info button"Info Button"
InfoButtonColorstrBackground color of info button"blue"
InfoButtonClickedfunctionCallback function when info is clickedself.accept()
timerint(MinimalFlyAlert only) milliseconds before auto-close5000
rtlboolRTL (right-to-left) buttons layoutFalse

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