Skip to main content

Gotipy

A simple Python wrapper for Gotify

Requirements

Installation

pip install gotipy

Usage

from gotipy import Gotify

g = Gotify(host_address='https://yourdomain.com')

Create a new application

g.create_app(admin_username='admin',
             admin_password='admin',
             app_name='demo',
             desc='My first app!')
# {
#     'id': 1,
#     'token': 'xxxxxxxxxx',
#     'name': 'demo',
#     'description': 'My first app!',
#     'internal': False,
#     'image': 'static/defaultapp.png'
# }

Push messages to an application

g.push(title='My message',
       message='Hello, World!',
       priority=9,
       token='xxxxxxxxxx')
# {
#     'id': 1,
#     'appid': 1,
#     'message': 'Hello, World!',
#     'title': 'My message',
#     'priority': 9,
#     'date': '2022-05-16T05:25:29.367216435Z'
# }

Notes:

  • You can set GOTIFY_HOST_ADDRESS as an envionmnt variable instead of passing host_address to the class instance.
  • If you want to use the same app in all your push calls, you can omit token from the method, and pass fixed_token=... to the class instance or set GOTIFY_APP_TOKEN as an envionmnt variable instead.
  • If you want to set a fixed priority level for all your push calls, pass fixed_priority to the class instance.

Download files

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

Source Distribution

gotipy-0.2.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

gotipy-0.2.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gotipy-0.2.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Darwin/21.6.0

File hashes

Hashes for gotipy-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a4bdf4db0892689044d82fa5136d0af58ead469c1ec4dd6eb75a65df247d35d3
MD5 3d99620ebb25c0692b8233e8360f5d9e
BLAKE2b-256 4198c0f980963fad84ebfb36cbfd8fdb97205359f7be459fdc16e4c8ac2cca9b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gotipy-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Darwin/21.6.0

File hashes

Hashes for gotipy-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d482ca52300dcf4a55c87c85f4ff8a4eb037ab47a581ad3f731132d1ba3ab93f
MD5 6bf29320b6b16b40255027190f7eb79b
BLAKE2b-256 cd1da032115f42e54c12bb76a81425b79ef7ae3cda2f4b95b5974776312f5457

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2

2 files

0.1.1

1 file

0.1

2 files

Supported by

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