每当发生github事件时调用用户注册函数的简单库。(例如,通知)
github_listener的Python项目详细描述
每当发生github事件时调用用户注册函数的简单库。
如何安装
您可以使用pip:
$ pip install github_listener
功能支持
- 通知
- …如果你有想要的东西,请通过issues告诉我。
示例
fromgithub_listenerimport(GithubAccount,GithubListener,)account=GithubAccount("username","password")listener=GithubListener(account)@listener.notificationdefon_notification(change):# Do things that you want to do whenever the github's notification occurs.passlistener.run()# infinite loop
fromgithub_listenerimportGithubAccountfromgithub_listener.github_apiimportNotificationAPIaccount=GithubAccount("username","password")api=NotificationAPI(account)groups=api.get_notification_groups()# Do something using notification informations.
有关更多详细示例,请转到Examples。
贡献
欢迎任何形式的贡献!