PushBullet Messaging and Alerting tools
To use this you should get the pushbullet app on your phone. On your computer, first go to the pushbullet website, and create an account. Then go to Settings and click Create Access Token. Copy this token as you will need it for configuring pushbullet_tools.
Installation
pip install pushbullet_tools
pbmsg config YOUR_PUSHBULLET_API_TOKEN
This will store your API token using your user's local python keyring.
Command-line Usage
pbmsg push -m 'push a simple message'
pbmsg push --title 'message title' -m 'message body'
pbmsg push --link <URL> --title 'Link Title' --body 'additional message to include'
pbmsg push --file <FILE_URL>
Context Manager
The pushbullet_tools.push_alert context manager you can execute a process and
receive a push notification on process completion or on error.
import pushbullet_tools as pbt
with pbt.push_alert():
/** insert long running process here **/
with pbt.push_alert(title='With love from {username}',
success_msg='This Turkey is cooked!',
fail_msg='There was a problem see: {error}',
closing_func=cleanup_func):
/** do lots of stuff **/
The messages can be customized and a closing_func can be assign to run after
process regardless of whether an error is thrown.
Sending messages in python
from pushbullet_tools import push_message as pm
pm.push_note(pm.HOSTNAME, pm.USERNAME + ' says hi')
pm.push_link('link title', 'some message context', 'link URL')
pm.push_file('some_file.py', 'text/python', 'https://file.download.url')
Metadata
Release files for pushbullet-tools 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pushbullet_tools-0.0.7.tar.gz | 4.3 kB | Without provenance | Details for pushbullet_tools-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pushbullet_tools-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for pushbullet_tools-0.0.7-py3-none-any.whl |
Total release size: 9.9 kB
Release files / pushbullet_tools-0.0.7.tar.gz
| Download URL | pushbullet_tools-0.0.7.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e3116d4741b6d305d5f6415f56da8e793f9954c9da7f84c69246b0e4424fecf
|
|
BLAKE2b-256 checksum How to use checksums |
562b365c109b259b2a9aa436cebccae3517d41e4369c3c53d9fe74172e72a3de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.0
|
Release files / pushbullet_tools-0.0.7-py3-none-any.whl
| Download URL | pushbullet_tools-0.0.7-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9c83bd5478071c0dd8f765791d748ac403b802ae94e3a873eb4e692c8961485
|
|
BLAKE2b-256 checksum How to use checksums |
88268526b0f087205ebbb7adaa0e7f035ae1950c55fcb73567a31581bcfa565b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.0
|
Security for pushbullet-tools 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.