Skip to main content

win11_notificationbar

Project description

Windows 11 通知栏通知系统

简介

本项目旨在实现一个基于Windows 11的通知栏通知系统。通过使用winsdk库,我们可以创建丰富的通知消息,并支持多种交互方式,如按钮点击、输入框、进度条等。

目录

  1. 简介
  2. 安装依赖
  3. 核心功能
  4. 异步通知
  5. 更新进度
  6. 清除通知
  7. 总结
  8. 附录

安装依赖

在开始之前,确保已经安装了所需的依赖库。可以通过以下命令安装:

pip install winsdk
pip install pywin32

核心功能

创建通知

使用notify函数创建一个基本的通知:

notify(title="Hello", body="This is a notification", inputs=["Enter your name"])

添加图标

设置通知的图标:

notify(title="Hello", body="This is a notification", icon="path/to/icon.png")

添加图片

在通知中添加图片:

notify(title="Hello", body="This is a notification", image="path/to/image.png")

添加进度条

显示进度条:

notify(title="Hello", body="This is a notification", progress={"value": "50"})

添加音频

播放音频文件:

notify(title="Hello", body="This is a notification", audio="path/to/audio.mp3")

添加按钮

添加按钮以实现用户交互:

notify(title="Hello", body="This is a notification", button="Click me")

添加输入框

添加输入框以获取用户输入:

notify(title="Hello", body="This is a notification", input="Enter your name")

添加选择框

添加选择框以供用户选择:

notify(title="Hello", body="This is a notification", selection=["Option 1", "Option 2"])

异步通知

使用toast函数创建异步通知,支持更复杂的交互逻辑:

更新进度

动态更新通知中的进度条:

update_progress({"value": "75"})

总结

通过本项目,我们实现了在Windows 11中创建丰富且交互性强的通知系统。这些功能可以帮助开发者更好地与用户进行互动,提升用户体验。

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

win11_notificationbar-0.0.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

win11_notificationbar-0.0.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file win11_notificationbar-0.0.1.tar.gz.

File metadata

  • Download URL: win11_notificationbar-0.0.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for win11_notificationbar-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bb6b34f6f24597dc34ccfb5e5d3fddef751b28ae797348a9c533aa49de042f80
MD5 435b400de11080c3cbfc628d4b5ed63d
BLAKE2b-256 9f59948e30378a7ac6995d2bcb9faaef92c7f7f1326493fb9f079bf70824ae8f

See more details on using hashes here.

File details

Details for the file win11_notificationbar-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for win11_notificationbar-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed82ceb63419116458c728be1dcaa642dd69851598ddc80a8e7f72c60b5ea8b
MD5 667ee1392e8481f4cc0b82ed2078663a
BLAKE2b-256 f9b5ec65cd3f7cfe64675b3210fcd3208dfa463e32eb2a446a74a896e3a52cc4

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