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.1.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.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gotify-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 20bb5c6526aa93d331d66e73649d36968c3c03c3ca87ee33af75ac1c12bd8276
MD5 157dd0b9d4b873cda8b82733c48a1e1f
BLAKE2b-256 7197825073b7a91c58a0f2495c163e88f5cb35d0c85cd9b82e8579286b21624e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gotify-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 801042e67109bfce4ea405c22fb1de2e171374d358db076cecaa6cf6efffb9da
MD5 18f920a8d378debe830573ffa48f5ac7
BLAKE2b-256 34b63d73074b960960caf97885df3590067da680e3fa444f4f428cbdaa4ad536

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