Skip to main content

Access your gotify server.

Project description

python-gotify

This python module allows to manage and send messages to your gotify server without handling requests manually.

Installation

python-gotify can be installed from PyPi using pip:

pip install gotify

Usage

To send messages:

from gotify import Gotify

gotify = Gotify(
    base_url="https://gotify.example.com",
    app_token="AsWIJhvlHb.xgKe",
)

gotify = Gotify(
    "Hello you wonderful people!",
    title="Hello World",
    priority=0,
)

Note: To send messages you need to create a new application and set app_token accordingly.

You can also manage things like applications:

from gotify import Gotify

gotify = Gotify(
    base_url="https://gotify.example.com",
    client_token="CoLwHBCAr8z2MMA",
)

app = gotify.create_application("foobar", description="test application")

print("Created new application:", app)

would result in

Created new application: {'id': 42, 'token': 'ArHD_yGYf63-A13', 'name': 'foobar', 'description': 'test application', 'internal': False, 'image': 'static/defaultapp.png'}

Note: For most things you need to create a new client and set client_token accordingly.

This module tries to implement every endpoint of the gotify API as an instance method of the Gotify class.

More details about the capabilities of gotify's API can be found in its API documentation.

Note: since I don't use any gotify plugins, plugin-related functions are completely untested.

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

gotify-0.4.tar.gz (17.6 kB view hashes)

Uploaded Source

Built Distribution

gotify-0.4-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

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