可从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选择方法   连接到127.0.0.1的java间歇性故障,连接到IP(eth0)时没有故障   java如何优雅地杀死hadoop作业/intercept`hadoop作业杀死`   java如何通过引导类加载器以编程方式加载另一个类?   url Java:在查询参数之前使用片段构建URI   在BroadLeaf表blc_order_属性中保存OrderAttributes值时发生java错误   安卓将功能从xml转换为java   java如何将数据写入文件?   java JPA SQL结果映射   Java中整数对象比较运算符的引用安全性   Spring测试失败:java。lang.NoClassDefFoundError:org/springframework/cglib/transform/impl/memorysafuendecaredthrowableStrategy   rich:extendedDataTable中的java行选择和数据处理   java为什么我需要在volatile上对多个线程使用synchronized?   java尽管构建成功,但为什么会出现此错误?   数组$ArrayList不能转换为java。util。java中的ArrayList   java如何根据泛型类型调用方法?   java将JLabel添加到JPanel,将JPanel添加到JFrame   如果MapStruct中的源为null,则java将父目标设置为null   JavaJBossDrools从DRL插入事实   java不同的JRE安装(windows)