Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
pygeon-notifications
Advanced tools
Pygeon lets you monitor programs by enabling in-code alerts in the form of push notifications on your phone. Alerts can have a custom title, body and an optional context string that gets displayed as the subtitle of the notification on your phone. Sound and vibration for alerts are on by default but could be overriden by your phone's notification settings.
pip install pygeon-notifications
Install and open the Pygeon app on your mobile (iOS only) and sign-in. After signing in you will recieve a private key. Use the private key to initialize pygeon in your terminal with the following command:
$ pygeon-init YOUR_PRIVATE_KEY
To send alert from the command line:
$ pygeon -t "Title"
If you want to include a body in the alert (body is optional):
$ pygeon -t "Title" -b "Body"
Note that maximum length of the body is 200 characters.
The most common use case of pygeon from the command line is when you want to alert yourself after a command is done executing. Here are a few examples of this scenario:
$ make && pygeon -t "Build Done"
$ pygeon -t "Python script finished!" -b $(python main.py)
In this case the output of main.py will be included in the body
Install and open the Pygeon app on your mobile (iOS only) and sign-in. After signing in you will recieve a private key. Use the private key to instantiate a Pygeon object that you can use to send alerts anywhere in your scripts
from pygeon import Pygeon
my_pygeon = Pygeon("YOUR_PRIVATE_KEY")
my_pygeon.send("Cool Title", "Even cooler description")
The Pygeon python package under the hood is a simple program that sends a POST request to Pygeon servers. Hence you can send alerts using a simple POST request to https://pygeon.io/api/alert
with your private key, title and description in the body of the request.
curl -X POST "https://pygeon.io/api/alert" -H 'Content-Type: application/json' -d '{"ppk":"YOUR_PRIVATE_KEY","title":"Cool Title", "desc": "Cool Body"}'
const axios = require('axios')
axios.post('https://pygeon.io/api/alert', {
ppk: 'YOUR_PRIVATE_KEY',
title: 'Cool Title',
desc: 'Even cooler description'
})
.then(res => {
console.log(`statusCode: ${res.status}`)
console.log(res)
})
.catch(error => {
console.error(error)
})
Pygeon is built for software developers and some use cases include but are not limited to:
from pygeon import Pygeon
my_pygeon = Pygeon("YOUR_PRIVATE_KEY")
long_task.execute()
# you step away for a beer 🍺
my_pygeon.send("Task finished!")
from pygeon import Pygeon
my_pygeon = Pygeon("YOUR_PRIVATE_KEY")
#custom trading logic
if eth_price >= eth_strike:
my_pygeon.send("Price Alert!", f"Eth above {eth_strike}")
Note that Pygeon alerts are also recieved on the apple watch if you have one connected to your phone.
FAQs
Supplementary package for usage with Pygeon mobile application
We found that pygeon-notifications demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.