Skip to content

Instantly share code, notes, and snippets.

@1049451037
Created March 3, 2019 15:50
Show Gist options
  • Save 1049451037/cf7a046bbec6e9e019ee8a8cc28c9383 to your computer and use it in GitHub Desktop.
Save 1049451037/cf7a046bbec6e9e019ee8a8cc28c9383 to your computer and use it in GitHub Desktop.
QPush: Push Messages to Mobile Phone
import requests
class QPush:
def __init__(self, name, code):
self.name = name
self.code = code
def send(self, msg):
data = {
"name": self.name,
"code": self.code,
"sig": "",
"cache": "false",
"msg[text]": str(msg)
}
url = "https://qpush.me/pusher/push_site/"
return requests.post(url, data=data)
if __name__ == '__main__':
qpush = QPush(your_qpush_name, your_qpush_code)
qpush.send("test")
@1049451037
Copy link
Author

1049451037 commented Mar 3, 2019

QPush only has iOS client for mobile now. Its introduction: https://qpush.me/en/push/

@1049451037
Copy link
Author

Usage of this script: Send log info to your mobile when you need to run a code for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment