Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acifani/update-notipy
📬 Send a notification when there is an update available for your package
https://github.com/acifani/update-notipy
notifier python python-library updater
Last synced: 3 months ago
JSON representation
📬 Send a notification when there is an update available for your package
- Host: GitHub
- URL: https://github.com/acifani/update-notipy
- Owner: acifani
- License: bsd-3-clause
- Created: 2018-03-31T11:35:13.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T09:34:20.000Z (about 2 years ago)
- Last Synced: 2024-10-08T14:12:13.175Z (3 months ago)
- Topics: notifier, python, python-library, updater
- Language: Python
- Homepage: https://pypi.org/project/update-notipy/
- Size: 22.5 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
📬 update-notipy
================Send a notification when there is an update available for your package!
Py-port of `update-notifier `_.Install
-------``pipenv install update_notipy``
or
``pip install update_notipy``
Usage
-----.. code-block:: python
from update_notipy import update_notify
update_notify(
,
,
callback=,
message=,
defer=).notify()Arguments
~~~~~~~~~- ``pkg_name: str``: name of the package as registered on PyPI
- ``pkg_version: str``: version of the installed package, to be compared with the latest one
- ``callback: Callable``: function to be called instead of printing the standard message
- ``message: str``: custom message to be printed
- ``defer: bool``: set to ``True`` if you want to notify the user when the app closesExamples
--------.. code-block:: python
from update_notipy import update_notify
__version__ = "0.1.0"
update_notify('pkg-info', __version__).notify()
# ┌───────────────────────────────────────────┐
# │ │
# │ Update available 0.1.0 → 0.1.2 │
# │ Run pip install -U pkg-info to update │
# │ │
# └───────────────────────────────────────────┘def foo():
four = 2 + 2
print(four)update_notify('pkg-info', __version__, callback=foo).notify()
# 4
update_notify('pkg-info', __version__, message="Hello, world!").notify()
# Hello, world!