可从https://pushnotifier.de轻松使用服务的python包/

pushnotifier的Python项目详细描述


python的pushnotifier(v2)

PyPI - Python VersionPyPI versionGitHub

GitterCodacy gradeGitHub repo size

在python项目中轻松使用PushNotifier服务的python模块。

特别感谢前往@Logxn

关于

轻松发送

  • 信息
  • 网址
  • 图像

通过python连接到所有设备。有关详细信息,请访问pushnotifier.de

安装

注意:必须安装requestspip install requests

  • 通过pip安装pushnotifier

    $ pip install pushnotifier
    
  • 手动安装PushNotifier

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

用法

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

发送消息

>>>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'])

获取基本信息

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

刷新应用程序令牌

>>>pn.refresh_token()'new_token'

更详细的帮助

>>>help(pn.some_method_you_need_help_on)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
字符串Java字母替换无效   java Spring Roo JPA MS SQL Server无法打开JPA EntityManager组织。冬眠例外GenericJDBCException:无法打开连接   在scala中使用JavaWS对大型数据文件进行java流式处理   Java编译器是否将字节和短字符识别为文本?   java无法查找符号错误,空指针   mongodb在Java中重用数据库连接   java将多个StringArray从字符串文件获取到活动中   java是一个变量,它只保存最后一次鼠标单击的坐标   c#尺寸有限;添加、删除和洗牌   java如何在Android中显示来自资产文件夹的文本文件中的文本   Android应用程序中的java Tensorflow Lite自定义对象检测模型错误   java如何在foreachloop中使用scanner将来自命令行的输入存储到数组中   java如何定义一个好的存储库接口   Android中的java解析动态json对象