Skip to main content

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

Project description

PushNotifier (V2) for Python

PyPI - Python Version PyPI version GitHub

Gitter Codacy grade GitHub repo size

A python module to easily use the service of PushNotifier in your python projects.

Special thanks go to @Logxn.

About

Easily send

  • messages ✉️
  • urls 🌎
  • images 🖼️

via python to all your devices. For more info visit pushnotifier.de

Installation

Note: you have to have requests installed (pip install requests)

  • Install PushNotifier via pip

    $ pip install pushnotifier
    
  • Install PushNotifier manually

    $ git clone https://github.com/tomg404/pushnotifier-python
    $ cd /path/to/repository/
    $ python setup.py install
    

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, devices=['abcd', 'efgh'])
>>> pn.send_url('https://www.example.com', silent=False, devices=['abcd', 'efgh'])
>>> pn.send_notification('hello world', 'https://www.example.com', silent=False, devices=['abcd', 'efgh'])

>>> # Note on send_image: currently you can't send images to android/ios devices
>>> pn.send_image('path/to/image.png', silent=False, devices=['abcd', 'efgh'])

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'

More detailed help

>>> help(pn.some_method_you_need_help_on)

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.2.tar.gz (4.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.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pushnotifier-1.2.2.tar.gz
  • Upload date:
  • Size: 4.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.2.tar.gz
Algorithm Hash digest
SHA256 fda5385d44c1a2c6eb4d5079ad4cf4867c55ad2a1ad6ebad1400e629ae53b9e1
MD5 a739c8d61f1fb087c64da1575613905c
BLAKE2b-256 947707315e2064095aabfece30fa2c4bf47cf2d8f784261b7cd69d6882eb1056

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pushnotifier-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ba262994c0c827921cc7530fc271a28a9552d33149f19a6d1976f04611a4d919
MD5 ca146ae7b283d9c1b2292cb582ac5e7b
BLAKE2b-256 e7f668824632753144c44dda649b08a265703f8666ef780c7737aaff2bc16db6

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