Giter VIP home page Giter VIP logo

apprise-client's Introduction

apprise-client

This is meant to be a wrapper to use apprise in existing python projects.

From the Apprise Developers

Apprise allows you to send a notification to almost all of the most popular notification services available to us today such as: Telegram, Discord, Slack, Amazon SNS, Gotify, etc. This API provides a simple gateway to directly access it via an HTTP interface.

  • This project was designed to be incredibly light weight.
  • Configuration can be persistently stored for retrieval.

You may simply import my wrapper apprise_notify() into your project

apprise_notify()

from apprise-client import apprise_notify

It requires a requests object along with the following:

  • host
  • port
  • apprise urls
  • apprise message title
  • apprise message body

Python Code example

import  requests  as  r
from apprise-client import apprise_notify

host = "192.168.1.50"
port = 8088
aurls = 'mailto://user:[email protected]'
title = 'test title'
body = 'test body'

apprise_notify(r, host, port, aurls, title, body)

You may also use a toml file to specify the options:

import  requests  as  r
from  tomllib  import  load
from apprise-client import apprise_notify

config_file_path  =  './config.toml'

with  open(config_file_path, 'rb') as  c:
			config  =  load(c)

host = config["apprise"]["host"]
port = config["apprise"]["port"]
aurls = config["apprise"]["aurls"]
title = config["apprise"]["title"]
body = config["apprise"]["body"]

apprise_notify(r, host, port, aurls, title, body)

toml file example:

[apprise]
host = "192.168.x.x"
port = 8088
aurls = 'mailto://user:[email protected]'
title = 'test title'
body = 'test body'

Apprise Documentation

Github Apprise urls

I recommend using docker to take advantage of the apprise service: Docker Hub

apprise-client's People

Contributors

jonbranan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.