Skip to main content

A python package for an easy use of the service from https://pushnotifier.de/

Project description

PushNotifier (V2) for Python

A python module to easily use the service of PushNotifier in your python projects. Special thanks go to @Logxn.

Installation

  • Install all dependencies

    pip install -r requirements.txt
    
  • Install PushNotifier

    pip install pushnotifier
    

Usage

from pushnotifier import PushNotifier as pn

pn = pn.PushNotifier('username', 'password', 'package_name', 'api_key')

Sending messages

>>> pn.send_text('hello world', silent=False)
>>> pn.send_url('https://www.example.com', silent=True)
>>> pn.send_notification('hello world', 'https://www.example.com')	# by default silent is set to False

Get Basic information

>>> pn.login()
{'username': 'username', 'avatar': 'https://gravatar.com/avatar/XXXXX', 'app_token': 'XXXXX', 'expires_at': XXXXX}

>>> pn.get_all_devices()
['abcd', 'efgh', 'ijkl']

Refresh app token

>>> pn.refresh_token()
'new_token'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pushnotifier-1.1.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

pushnotifier-1.1.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page