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. Currently there is no support for sending images.

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
>>> pn.send_image('path/to/image.png')

Get Basic information

>>> password = 'XXXXX'
>>> pn.login(password)
{'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.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pushnotifier-1.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pushnotifier-1.2.tar.gz.

File metadata

  • Download URL: pushnotifier-1.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.6

File hashes

Hashes for pushnotifier-1.2.tar.gz
Algorithm Hash digest
SHA256 eeda87a48efd9b084a4601fc1a47b15d0d14a36670a9ea42d23411b824b34125
MD5 90a7991b111dc58f84b0851c142e30f5
BLAKE2b-256 d97d759b4a3668277440dcdebb8d12d3edd5ad284a5c1d7f60b5db4fe88da939

See more details on using hashes here.

File details

Details for the file pushnotifier-1.2-py3-none-any.whl.

File metadata

  • Download URL: pushnotifier-1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.6

File hashes

Hashes for pushnotifier-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e65a9925ecc5883d9175c81bb0414ec0768f5f7069ca9fc1ed74b7cfc97bfc56
MD5 7b975acefbc164c94493aac2b4dcc542
BLAKE2b-256 c17f3b773f6c18a105a473d93a82cafa3acb52153dda5d84533e6e2ab7df887d

See more details on using hashes here.

Supported by

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