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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gotify-0.4.tar.gz
Algorithm Hash digest
SHA256 73db89bef9c32fc6b3aee5acb75c2880ac458db522e5290fe5789e8d62c69ccf
MD5 c709f3a0402750072043020ff972c236
BLAKE2b-256 5725d245d15de7682aa2225facc9f8843a142da0b38cf4a9cdadafeb84b7dd22

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gotify-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cf076bca5d4ef73077ac83fddbfaee75232cdb108ebe2561c5d0aaae7d85a4e4
MD5 12bd84ffbb74e92a659ddf70735f7145
BLAKE2b-256 4806db9f577dcbe145faf4d3aa4f5e7756845f6f4b925f232dbd3a7b1d713c65

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