Skip to content

Latest commit

 

History

History
88 lines (62 loc) · 4.19 KB

README.md

File metadata and controls

88 lines (62 loc) · 4.19 KB

WAN

Wait and notify conveniently

CI CommitLint DevContainer Release Renovate Semantic Release Coverage Release PyPI PyPI - Python Version GitHub

pdm-managed pre-commit Checked with mypy Ruff Conventional Commits Pydantic v2 Copier Serious Scaffold Python Open in Dev Containers

Important

WAN is in the Beta phase. Changes and potential instability should be anticipated. Any feedback, comments, suggestions and contributions are welcome!

Wait And Notify(WAN)

This package is under development. We will release it soon in the future.

Installation

You can install wan with one of the following command

# 1)
pip install wanot

config

Please config your notifiers. wan will read the setting in ~/.dotfiles/.notifers.yaml as the arguments for notifiers.

Here is a config example of telegram

provider: telegram
kwargs:
    chat_id: <Your Chat id from  `@myidbot` by sending `/getid`>
    token: <Your token from `@BotFather` by sending `/newbot`>

Other configs:

log_level: DEBUG  # the default level is INFO

Usage

Use in python code

  • Call the function in python code directly.
<Your code which takes a lot of time>
from wan import ntf; ntf('Finished')
  • Call the function in shell directly
> sleep 10 ; wan ntf sleep finished

📜 License

MIT License, for more details, see the LICENSE file.