Skip to main content

Malachi - Windows 10 Toast Notifications

Overview

Malachi is a Python module designed to create Windows 10 toast notifications. It is a customized version of the win10toast_click module, which is no longer maintained. This module allows users to display notifications with custom icons, messages, and click callbacks.

Features

  • Display Windows 10 toast notifications.
  • Support for custom icons.
  • Configurable duration for notifications.
  • Threaded notifications to avoid blocking.
  • Callback functionality for mouse clicks within the notification window.

Installation

To install the module, use the following command:

pip install malachi

Usage

Basic Notification

from malachi import ToastNotifier

notifier = ToastNotifier()
notifier.show_toast(
    title="Notification Title",
    msg="This is a sample notification message",
    duration=5
)

Notification with Custom Icon

notifier.show_toast(
    title="Custom Icon Notification",
    msg="This notification has a custom icon",
    icon_path="path/to/icon.ico",
    duration=5
)

Threaded Notification

notifier.show_toast(
    title="Threaded Notification",
    msg="This notification runs in a separate thread",
    threaded=True
)

Notification with Click Callback

def on_click():
    print("Notification clicked!")

notifier.show_toast(
    title="Clickable Notification",
    msg="Click me!",
    callback_on_click=on_click
)

API Reference

ToastNotifier

show_toast

Displays a toast notification.

Parameters:

  • title (str): The title of the notification.
  • msg (str): The message to display.
  • icon_path (str, optional): Path to the .ico file for the notification icon.
  • duration (int, optional): Duration in seconds before the notification self-destructs. Set to None for no self-destruction.
  • threaded (bool, optional): Whether to run the notification in a separate thread.
  • callback_on_click (callable, optional): Function to call when the notification is clicked.

notification_active

Checks if there is an active notification.

Returns:

  • bool: True if a notification is active, False otherwise.

License

This project is licensed under the MIT License.

Acknowledgments

This module is inspired by the win10toast_click module created by jithurjacob.

Metadata

Release files for malachi 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for malachi 1.0.3
File Size Uploaded Provenance Actions
malachi-1.0.3.tar.gz 4.4 kB Without provenance Details for malachi-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for malachi 1.0.3
File Interpreter ABI Platform Actions
malachi-1.0.3-py3-none-any.whl Python 3 none any Details for malachi-1.0.3-py3-none-any.whl

Total release size: 8.9 kB

Release files / malachi-1.0.3.tar.gz

Download URL malachi-1.0.3.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6f0458133a83836bc7307ff7a88eb656f351566363c2bc6c05de9b937ef66153
BLAKE2b-256 checksum
How to use checksums
9499027887961748c85b2f56796d8b6ba7a3b109bbac5a3e9c3785b0dd737919
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / malachi-1.0.3-py3-none-any.whl

Download URL malachi-1.0.3-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ca287f03f47efcdd26b547787308ad7c1cff3c27623f790dd8d71260eba1a4f
BLAKE2b-256 checksum
How to use checksums
e4f71f65ce34dc27fe5fb87ed33210d0729cf1270a2ed69d57c3b1282bfe06d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Security for malachi 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page