Created
January 13, 2026 16:22
-
-
Save timlnx/157c41ff742d3459f03c917d30cbaa09 to your computer and use it in GitHub Desktop.
Transmission Pushover Call Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/Users/yourname/venvs/transmission/bin/python3 | |
| import os | |
| import requests | |
| # This is your 'user key' in the web interface. There is only one of these. | |
| APITOKEN='' | |
| # This is unique to each application you write that emits notifications | |
| APPTOKEN='' | |
| ENDPOINT = 'https://api.pushover.net/1/messages.json' | |
| DATA = { | |
| 'user': APITOKEN, | |
| 'token': APPTOKEN, | |
| 'message': os.environ.get('TR_TORRENT_NAME', 'Torrent Name Unavailable'), | |
| } | |
| res = requests.request(method='POST', url=ENDPOINT, data=DATA) | |
| if res.status_code == requests.codes.ok: | |
| print("Push request accepted") | |
| else: | |
| res.raise_for_status() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment