GithubHelp home page GithubHelp logo

tomg404 / pushnotifier-python Goto Github PK

View Code? Open in Web Editor NEW
18.0 0.0 6.0 55 KB

PushNotifier SDK for Python

Home Page: https://pushnotifier.de

License: MIT License

Python 100.00%
sdk python push-notifications

pushnotifier-python's Introduction

PushNotifier (V2) for Python

PyPI - Python Version PyPI version build Documentation Status GitHub GitHub repo size

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

You can find the documentation here.

About

Easily send

  • messages โœ‰๏ธ
  • urls ๐ŸŒŽ
  • images ๐Ÿ–ผ๏ธ

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

Installation

  • 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

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

See the documentation or

>>> help(pn.some_method_you_need_help_on)

pushnotifier-python's People

Contributors

dependabot[bot] avatar logxn avatar mark-bloom avatar tomg404 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pushnotifier-python's Issues

Double Notifications

Hey,
everytime I call the pn.send_text method in my python script, I'll get two notifications but I only get one print. Why is that?
here my code: (Devices censored)

print("Send Message!")
pn.send_text('Test!', silent=False, devices=['*****'])

Faulty package name

I installed the app on iOS. According the app, the package name is com.gidix.pushNotifier

When I use that as a parameter to PushNotifier function along with the API key an "UnauthorizedError" assertion is raised and the exception is "package name or api key is incorrect". Is there a different package name for the app?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.