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:

import gotify

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

gotify_obj.create_message(
    "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:

import gotify

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

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

print("Created new application:", app)

would result in

Created new application: {'id': 42, 'token': 'ArHD_yGYf63-A13', 'name': 'fooba
r', 'description': 'test application', 'internal': False, 'image': 'static/def
aultapp.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. If you use only one gotify instance, you can use the module-level functions instead, which then use an internal gotify object.

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.2.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

gotify-0.2.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file gotify-0.2.2.tar.gz.

File metadata

  • Download URL: gotify-0.2.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for gotify-0.2.2.tar.gz
Algorithm Hash digest
SHA256 493351486825ead7eb8e2f24f36c7cfd04365789efbdf429b69cc9b796bed43c
MD5 a838c89da3fb3eb7149396de15ba1bf3
BLAKE2b-256 2ea9c4f2f310dfb73b4144e18e646df1dc6798dafa56e0d36349d2e435040371

See more details on using hashes here.

File details

Details for the file gotify-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: gotify-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for gotify-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8df40546d8d67626aee017297b26671ab48686efbfae3b4d6e2da3c836920b8b
MD5 34c574fcd8caa4645f0ab7cc1cb3784c
BLAKE2b-256 fbbeb290d1a425017af6f4e89b3b28911ae19e7d5afdf8a7ef9d6b6416b6f8c2

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