Skip to main content

Prowlpy is a python library that implements the public api of Prowl to send push notification to iPhones.

Project description

Prowlpy

PyPI Status PyPI version Python Test linting: Ruff codecov pre-commit

Python library to interface with the Prowl API.

Installation

Prowlpy is installable as a library to be used within scripts or apps or with a CLI to send messages from the command line.

To install user/system wide use pip install prowlpy otherwise add it as normal to your pyproject.toml or requirements.txt

The CLI is not installed by default. You can include it when installing. Using uv you would use this command:

uv tool install prowlpy[cli]

Usage

Prowlpy can be used in multiple ways.

library

Sync or Async

Both sync and async versions of the library are available. To use async, replace Prowl with AsyncProwl

Sending messages

from prowlpy import Prowl

apikey = "1234567890123456789012345678901234567890"
p = Prowl(apikey=apikey)
p.send(application="Test App", event="Test Event", description="The testing event has failed")

Prowlpy can also be used within a context manager:

from prowlpy import Prowl

apikey = "1234567890123456789012345678901234567890"
with Prowl(apikey=apikey) as p:
    p.send(application="Test App", event="Test Event", description="The testing event has failed")

Verify API key(s)

Prowlpy can also be used to verify an API key before sending a message or as a testing step like this:

from prowlpy import Prowl

apikey = "1234567890123456789012345678901234567890"
p = Prowl(apikey=apikey)
p.verify_key()

If the key is not valid or an error occurs an APIError Exception will be raised.

Generate API Key(s)

Prowlpy can be used to generate API keys for users if you have a valid providerkey with a process similar to this:

from prowlpy import Prowl

providerkey = "0987654321098765432109876543210987654321"
p = Prowl(providerkey=providerkey)
token_response = p.retrieve_token()
print(token_response["url"])

The user that the key is being created for will need to fillow the link provided and accept then the key can be created on the account with:

...
apikey_respose = p.retrieve_apikey(token=token_response["token"])
print(apikey_response["apikey"])

CLI

The CLI can be used to send massages via Prowl like this:

prowlpy --apikey="1234567890123456789012345678901234567890" --application="Test App" --event="Testing" --description="This is a test message"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prowlpy-2.0.0.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prowlpy-2.0.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file prowlpy-2.0.0.tar.gz.

File metadata

  • Download URL: prowlpy-2.0.0.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for prowlpy-2.0.0.tar.gz
Algorithm Hash digest
SHA256 c63df4a920436ab158fb50c57167559c2979ac40884be81f30459dfaedf5231e
MD5 b17c06db182f03cfa4fdcb67dc5d18b6
BLAKE2b-256 32fc5d83992e94a27a44e6a7ed9ec81b1b8ee1fa55760eca74f04d8ea8c9be51

See more details on using hashes here.

File details

Details for the file prowlpy-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: prowlpy-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for prowlpy-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6d526664546a0ff41a3998995bf7dda0a8e7983a39ae1b6b2751a66153cb4dc
MD5 e2e70d646c71ee1d3a8117829d14a73c
BLAKE2b-256 8eaa91d2d0ade86121d9242e10aea363192f43a9ffe4bfcdf8950a71688e2b1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page