All Projects → Thibauth → Python Pushover

Thibauth / Python Pushover

Licence: gpl-3.0
Comprehensive bindings and command line utility for the Pushover notification service

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Python Pushover

Faviator
A simple easy favicon generator.
Stars: ✭ 155 (-1.9%)
Mutual labels:  cli
Proji
A powerful cross-platform CLI project templating tool.
Stars: ✭ 156 (-1.27%)
Mutual labels:  cli
Gh
Easily manage your local git repos
Stars: ✭ 156 (-1.27%)
Mutual labels:  cli
Backport
A simple CLI tool that automates the process of backporting commits on a GitHub repo
Stars: ✭ 154 (-2.53%)
Mutual labels:  cli
Actions Cli
Monitor your GitHub Actions in real time from the command line
Stars: ✭ 156 (-1.27%)
Mutual labels:  cli
Vue Cli Plugin Prerender Spa
Boost SEO by prerendering your Vue application. Powered by prerender-spa-plugin.
Stars: ✭ 156 (-1.27%)
Mutual labels:  cli
Prism
Turn any OpenAPI2/3 and Postman Collection file into an API server with mocking, transformations and validations.
Stars: ✭ 2,484 (+1472.15%)
Mutual labels:  cli
Gitoxide
An idiomatic, lean, fast & safe pure Rust implementation of Git
Stars: ✭ 2,696 (+1606.33%)
Mutual labels:  cli
Gif Progress
🎬 Attach progress bar to animated GIF
Stars: ✭ 156 (-1.27%)
Mutual labels:  cli
Licenseplist
A license list generator of all your dependencies for iOS applications
Stars: ✭ 1,996 (+1163.29%)
Mutual labels:  cli
Investigator
Interactive and asynchronous logging tool for Node.js. An easier way to log & debug complex requests directly from the command line (experimental).
Stars: ✭ 155 (-1.9%)
Mutual labels:  cli
Abandon
😌 Simple and Robust Accounting
Stars: ✭ 155 (-1.9%)
Mutual labels:  cli
Texture Compressor
CLI tool for texture compression using ASTC, ETC, PVRTC and S3TC in a KTX container.
Stars: ✭ 156 (-1.27%)
Mutual labels:  cli
Microplane
A CLI tool to make git changes across many repos, especially useful with Microservices.
Stars: ✭ 154 (-2.53%)
Mutual labels:  cli
Foy
A simple, light-weight and modern task runner for general purpose.
Stars: ✭ 157 (-0.63%)
Mutual labels:  cli
Keep A Changelog
Tools for manipulating CHANGELOG.md files in Keep A Changelog format, including tagging and releasing.
Stars: ✭ 155 (-1.9%)
Mutual labels:  cli
Packtpub Downloader
Script to download all your books from PacktPub inspired by https://github.com/ozzieperez/packtpub-library-downloader
Stars: ✭ 156 (-1.27%)
Mutual labels:  cli
Sonnerie
A simple timeseries database
Stars: ✭ 157 (-0.63%)
Mutual labels:  cli
Slack Cli
Slack CLI for productive developers
Stars: ✭ 157 (-0.63%)
Mutual labels:  cli
C
Compile and execute C "scripts" in one go!
Stars: ✭ 1,920 (+1115.19%)
Mutual labels:  cli

python-pushover aims at providing comprehensive Python bindings for the API of the Pushover Notification Service_ as documented here__.

.. _Pushover Notification Service: https://pushover.net/ .. __: https://pushover.net/api

Installation

You can install python-pushover from Pypi_ with:

.. code-block:: bash

$ pip install python-pushover

Or you can install it directly from GitHub_:

.. code-block:: bash

git clone https://github.com/Thibauth/python-pushover.git
cd python-pushover
pip install .

.. _Pypi: https://pypi.python.org/pypi/python-pushover/ .. _GitHub: https://github.com/Thibauth/python-pushover

Overview

After being imported, the module must be initialized by calling the init function with a valid application token. Thus, a typical use of the pushover module looks like this:

.. code-block:: python

from pushover import init, Client

init("<token>")
Client("<user-key>").send_message("Hello!", title="Hello")

You can also pass the api_token optional argument to Client to initialize the module at the same time:

.. code-block:: python

from pushover import Client

client = Client("<user-key>", api_token="<api-token>")
client.send_message("Hello!", title="Hello")

Attachments can be sent with the attachment parameter which takes as argument as file object:

.. code-block:: python

with open('/path/to/my/image.png', 'rb') as image:
    client.send_message('Message with image', attachment=image)

Command line


``python-pushover`` also comes with a command line utility ``pushover`` that
you can use as follows:

.. code-block:: bash

    pushover --api-token <api-token> --user-key <user-key> "Hello!"

Use ``pushover --help`` to see the list of available options.

Configuration

Both the pushover module and the pushover command line utility support reading arguments from a configuration file.

The most basic configuration file looks like this:

.. code-block:: ini

[Default]
api_token=aaaaaa
user_key=xxxxxx

You can have additional sections and specify a device as well:

.. code-block:: ini

[Sam-iPhone]
api_token=bbbbbb
user_key=yyyyyy
device=iPhone

python-pushover will attempt to read the configuration from ~/.pushoverrc by default. The section to read can be specified by using the profile argument. With the configuration file above, you can send a message by simply doing:

.. code-block:: python

from pushover import Client

Client().send_message("Hello!", title="Hello")

or pushover --title "Hello" "Hello!" from the command line.

API

You can access the full API documentation here__.

.. __: http://pythonhosted.org/python-pushover/#module-pushover

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].