Skip to main content

Notifications Toolbox

Pushit

Send Pushover notifications.

Install

Pushit needs Python 3.13 or later, a Pushover user key, and an application API token.

pip install lupaxa-pushit
pushit --help

CLI

pushit --user "$PUSHOVER_USER_KEY" --token "$PUSHOVER_API_TOKEN" --text "Hello"
pushit --profile alerts --text "Hello"
pushit -p alerts --config "$HOME/work/pushit.yml" --text "Disk full"
pushit --profile alerts --text "down" --emergency --group "$PUSHOVER_GROUP_KEY"
pushit --profile alerts --text "see" --title pushit --url https://example.com --url-title Open
pushit --profile alerts --text "see" --attachment report.png --sound pushover --device phone
pushit --token "$PUSHOVER_API_TOKEN" --sounds
python -m lupaxa.pushit --version

--text is required for a send. --emergency and --group may be combined with it. --priority cannot be combined with --emergency. --retry and --expire require --emergency. --sounds lists sorted sound names, one per line, and cannot be combined with a send.

A successful send prints nothing. The $PUSHOVER_* names are shell variables expanded before pushit runs. Pushit does not read environment variables. A command-line value overrides the same profile field. --group replaces the user key for that send. Error text replaces the API token, user key, and group key with [redacted].

Config

Profiles live in $HOME/.pushit.yml. Pass --config to use another file. --config requires --profile. url_title requires a url. retry and expire are used only for an emergency send. There is no profile field for a group key.

profiles:
  alerts:
    user_key: USER_KEY
    api_token: API_TOKEN
    title: pushit
    url: https://example.com/alert
    url_title: Open
    sound: pushover
    device: phone
    priority: 0
    timeout: 15
    retry: 30
    expire: 3600

Library

from lupaxa.pushit import Pushit, load_profile

profile = load_profile("alerts")
client = Pushit(
    profile.api_token,
    user_key=profile.user_key,
    timeout=profile.timeout or 10.0,
)
body = client.send_message(
    "disk full",
    title="pushit",
    priority=2,
    retry=30,
    expire=3600,
    group_key="GROUP_KEY",
)
client.list_sounds()

send_message and list_sounds return the parsed JSON object. load_profile reads one named profile. The package also exports ConfigError, Profile, default_config_path, DEFAULT_TIMEOUT, get_version, and __version__.

Reference

Flag Default Description
--user profile user_key Pushover user key
--token profile api_token Application API token
--profile, -p — Profile name
--config ~/.pushit.yml Config file; requires --profile
--text, -t — Message, at most 1024 characters
--title profile Title, at most 250 characters
--url profile Supplementary URL, at most 512 characters
--url-title profile URL title, at most 100 characters
--priority profile, else 0 -2, -1, 0, or 1
--sound profile Sound name
--device profile Device name or comma-separated names
--attachment — One file path, at most 5,242,880 bytes
--emergency — Force priority 2
--retry profile, else 30 Seconds between retries; requires --emergency
--expire profile, else 3600 Emergency lifetime; requires --emergency
--group — Group key; replaces the user key
--sounds — List sorted sound names
--timeout, -T profile, else 10 Positive timeout in seconds
--version — Print the package version
Field Rule
user_key Non-empty string; recipient unless --user or --group overrides it
api_token Non-empty string; overridden by --token
title Non-empty string, at most 250 characters
url Non-empty string, at most 512 characters
url_title Non-empty string, at most 100 characters; requires url
sound Non-empty string
device Non-empty string
priority Integer -2, -1, 0, or 1
timeout Finite number greater than 0
retry Integer at least 30; used only for emergency sends
expire Integer from 1 through 10,800; used only for emergency sends
Code Meaning
0 Send accepted, sounds printed, help shown, or version printed
1 Validation, HTTP, or request error
2 Command usage or configuration error

Development

make init
make python-install-dev
make python-check
The Lupaxa Project Footer

Metadata

Release files for lupaxa-pushit 0.1.4

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

Source distribution (sdist)

Source distribution for lupaxa-pushit 0.1.4
File Size Uploaded
lupaxa_pushit-0.1.4.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lupaxa-pushit 0.1.4
File Interpreter ABI Platform
lupaxa_pushit-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / lupaxa_pushit-0.1.4.tar.gz

Download URL lupaxa_pushit-0.1.4.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
44f2bd8189b3295f00471322bf28bb94da4b0a8f2a29eb24d9cb7f44ecd3e394
BLAKE2b-256 checksum
How to use checksums
99b17f031b2b5b617ea645730e8817b7404af3fb9af0c7ad47d67ad84f8be24b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / lupaxa_pushit-0.1.4-py3-none-any.whl

Download URL lupaxa_pushit-0.1.4-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9c86ac53762d8d0500715c89a7053e2090ddd496bcf01a081231ea653f45368
BLAKE2b-256 checksum
How to use checksums
05e9073a0bb2670dd5b889fc81ec80032cba9c1bedbdf16cdc16e0e6bfd63688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.5

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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