All Projects → knowsuchagency → Klaxon

knowsuchagency / Klaxon

Licence: apache-2.0
Mac OS notifications from Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Klaxon

Mater
🍅 A simple and purty menubar Pomodoro app written in Electron
Stars: ✭ 433 (+587.3%)
Mutual labels:  productivity, mac
Sandman Lite
A Lightweight Script Built With Late Night Developers In Mind
Stars: ✭ 64 (+1.59%)
Mutual labels:  productivity, mac
Hawkeye
A useful app for GitHub Notifications
Stars: ✭ 193 (+206.35%)
Mutual labels:  notifications, mac
Notica
Send browser notifications from your terminal. No installation. No registration.
Stars: ✭ 215 (+241.27%)
Mutual labels:  productivity, notifications
productivity-tips-for-mac
Awesome Productivity Tips for Mac Developers
Stars: ✭ 38 (-39.68%)
Mutual labels:  productivity, mac
linearmouse
🖱 The mouse and trackpad utility for Mac.
Stars: ✭ 1,151 (+1726.98%)
Mutual labels:  productivity, mac
Kap
An open-source screen recorder built with web technology
Stars: ✭ 14,488 (+22896.83%)
Mutual labels:  productivity, mac
Webcatalog App
Official WebCatalog app.
Stars: ✭ 369 (+485.71%)
Mutual labels:  productivity, mac
Singlebox Legacy
All Your Apps in One Single Window
Stars: ✭ 32 (-49.21%)
Mutual labels:  productivity, mac
Notifier
NO LIBRARIES socket per page bridge for your Laravel application. (CLIENT PART INCLUDED)
Stars: ✭ 57 (-9.52%)
Mutual labels:  notifications
Teller Cli
🏦 Banking for your command line.
Stars: ✭ 60 (-4.76%)
Mutual labels:  notifications
Dotfiles
A shell script to install awesome command for *nix platform and set them up
Stars: ✭ 56 (-11.11%)
Mutual labels:  mac
Ansible Osx Command Line Tools
An Ansible role for installing OS X Command Line Tools
Stars: ✭ 57 (-9.52%)
Mutual labels:  mac
Webmention Client Ruby
A Ruby gem for sending Webmention notifications.
Stars: ✭ 60 (-4.76%)
Mutual labels:  notifications
Zoomin
Safari extension for opening Zoom right away
Stars: ✭ 57 (-9.52%)
Mutual labels:  mac
E Commerce App React Native
E-commerce App UI. React native, Expo managed flow, React navigation v5, Notification.
Stars: ✭ 61 (-3.17%)
Mutual labels:  notifications
Laravel Fcm
🌐 A Laravel package to send Push Notifications to one or many devices of the user.
Stars: ✭ 56 (-11.11%)
Mutual labels:  notifications
Chime
🎵 Python sound notifications made easy
Stars: ✭ 56 (-11.11%)
Mutual labels:  notifications
Whc datamodelfactory
Mac上iOS开发辅助工具,快速把json/xml数据转换生成对应模型类属性,省去麻烦手动创建,提高开发效率。Mac iOS development aid, quickly put the json/XML data transformation generates the corresponding model class attribute, save trouble created manually, improve the development efficiency.
Stars: ✭ 1,118 (+1674.6%)
Mutual labels:  mac
Dotfiles
Setup your Mac and sync it with your other machines.
Stars: ✭ 61 (-3.17%)
Mutual labels:  mac

klaxon

Send Mac OS (or notifiers) notifications from the terminal or Python programs.

This is especially useful for when you want a push notification for some long-running background task.

Similar to the terminal-notifier ruby gem, but posix-compliant and able to send notifications via the notifiers library.

hello-klaxon

Installation

For command-line use, the recommended method of installation is through pipx.

pipx install klaxon

Naturally, klaxon can also be pip-installed.

pip install klaxon

Usage

terminal

# blank notification
klaxon
# with custom message
klaxon --message "this is the message body"
# pipe message from other program
echo "this is the message body" | klaxon --

python

from klaxon import klaxon, klaxonify

# send a notification

klaxon(
    title='hello, klaxon',
    subtitle='hola',
    message='it me'
)

# we can decorate our functions to have
# them send notifications at termination

@klaxonify
def hello(name='world'):
    return f'hello, {name}'


@klaxonify(title='oh hai', output_as_message=True)
def foo():
    return "This will be the message body."

Non-MacOS Notifications

i.e. mobile | email | slack

You'll need to install klaxon with the notifiers extra.

pipx install klaxon[notifiers]

You will need a ~/.config/klaxon/config.toml or pyproject.toml file with the tool.klaxon namespace configured at the top level. Values from the latter will override values in the former.

enable-notifiers will need to be set to true and you will need a [[notifiers]] key.

The latter will determine the parameters passed to the notifiers.notify method.

For example:

~/.config/klaxon/config.toml

enable-notifiers = true

[[notifiers]]
name = 'slack'
# see https://api.slack.com/incoming-webhooks#getting-started
webhook_url = {{your webhook url}}

[[notifiers]]
name = 'pushover'
user = {{your user token}}
token = {{your application token}}

Voila! Now messages sent from klaxon will be pushed to slack and pushover.

Development

git clone [email protected]:knowsuchagency/klaxon.git

cd klaxon

# create a virtualenv and activate it

python3 -m venv .venv
source .venv/bin/activate

# install poetry and use it to install project dependencies

pip install -U pip
pip install poetry
poetry install

# this will install `invoke` which will let you use the tasks defined in `tasks.py`

# install pre-commit hooks

inv install-hooks

# from now on, as you make changes to the project, the pre-commit hooks and
# github workflows will help make sure code is formatted properly and tests
# are invoked as you commit, push, and submit pull requests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].