Refactor: Python Module Naming & Namespace Harmonization (#1119)

pull/1120/head
Chris Caron 2024-04-27 13:02:27 -04:00 committed by GitHub
parent 08cb018e11
commit b8da1334ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
267 changed files with 678 additions and 639 deletions

View File

@ -49,16 +49,17 @@ from .common import CONTENT_INCLUDE_MODES
from .common import ContentLocation from .common import ContentLocation
from .common import CONTENT_LOCATIONS from .common import CONTENT_LOCATIONS
from .URLBase import URLBase from .url import URLBase
from .URLBase import PrivacyMode from .url import PrivacyMode
from .plugins.NotifyBase import NotifyBase from .plugins.base import NotifyBase
from .config.ConfigBase import ConfigBase from .config.base import ConfigBase
from .attachment.AttachBase import AttachBase from .attachment.base import AttachBase
from .Apprise import Apprise from .apprise import Apprise
from .AppriseAsset import AppriseAsset from .locale import AppriseLocale
from .AppriseConfig import AppriseConfig from .asset import AppriseAsset
from .AppriseAttachment import AppriseAttachment from .apprise_config import AppriseConfig
from .apprise_attachment import AppriseAttachment
from . import decorators from . import decorators
@ -73,7 +74,7 @@ logging.getLogger(__name__).addHandler(logging.NullHandler())
__all__ = [ __all__ = [
# Core # Core
'Apprise', 'AppriseAsset', 'AppriseConfig', 'AppriseAttachment', 'URLBase', 'Apprise', 'AppriseAsset', 'AppriseConfig', 'AppriseAttachment', 'URLBase',
'NotifyBase', 'ConfigBase', 'AttachBase', 'NotifyBase', 'ConfigBase', 'AttachBase', 'AppriseLocale',
# Reference # Reference
'NotifyType', 'NotifyImageSize', 'NotifyFormat', 'OverflowMode', 'NotifyType', 'NotifyImageSize', 'NotifyFormat', 'OverflowMode',

View File

@ -33,18 +33,18 @@ from itertools import chain
from . import common from . import common
from .conversion import convert_between from .conversion import convert_between
from .utils import is_exclusive_match from .utils import is_exclusive_match
from .NotificationManager import NotificationManager from .manager_plugins import NotificationManager
from .utils import parse_list from .utils import parse_list
from .utils import parse_urls from .utils import parse_urls
from .utils import cwe312_url from .utils import cwe312_url
from .emojis import apply_emojis from .emojis import apply_emojis
from .logger import logger from .logger import logger
from .AppriseAsset import AppriseAsset from .asset import AppriseAsset
from .AppriseConfig import AppriseConfig from .apprise_config import AppriseConfig
from .AppriseAttachment import AppriseAttachment from .apprise_attachment import AppriseAttachment
from .AppriseLocale import AppriseLocale from .locale import AppriseLocale
from .config.ConfigBase import ConfigBase from .config.base import ConfigBase
from .plugins.NotifyBase import NotifyBase from .plugins.base import NotifyBase
from . import plugins from . import plugins
from . import __version__ from . import __version__

View File

@ -27,9 +27,9 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
from . import URLBase from . import URLBase
from .attachment.AttachBase import AttachBase from .attachment.base import AttachBase
from .AppriseAsset import AppriseAsset from .asset import AppriseAsset
from .AttachmentManager import AttachmentManager from .manager_attachment import AttachmentManager
from .logger import logger from .logger import logger
from .common import ContentLocation from .common import ContentLocation
from .common import CONTENT_LOCATIONS from .common import CONTENT_LOCATIONS

View File

@ -28,9 +28,9 @@
from . import ConfigBase from . import ConfigBase
from . import CONFIG_FORMATS from . import CONFIG_FORMATS
from .ConfigurationManager import ConfigurationManager from .manager_config import ConfigurationManager
from . import URLBase from . import URLBase
from .AppriseAsset import AppriseAsset from .asset import AppriseAsset
from . import common from . import common
from .utils import GET_SCHEMA_RE from .utils import GET_SCHEMA_RE
from .utils import parse_list from .utils import parse_list

View File

@ -33,7 +33,7 @@ from os.path import dirname
from os.path import isfile from os.path import isfile
from os.path import abspath from os.path import abspath
from .common import NotifyType from .common import NotifyType
from .NotificationManager import NotificationManager from .manager_plugins import NotificationManager
# Grant access to our Notification Manager Singleton # Grant access to our Notification Manager Singleton

View File

@ -27,8 +27,8 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
# Used for testing # Used for testing
from .AttachBase import AttachBase from .base import AttachBase
from ..AttachmentManager import AttachmentManager from ..manager_attachment import AttachmentManager
# Initalize our Attachment Manager Singleton # Initalize our Attachment Manager Singleton
A_MGR = AttachmentManager() A_MGR = AttachmentManager()
@ -36,4 +36,5 @@ A_MGR = AttachmentManager()
__all__ = [ __all__ = [
# Reference # Reference
'AttachBase', 'AttachBase',
'AttachmentManager',
] ]

View File

@ -29,10 +29,10 @@
import os import os
import time import time
import mimetypes import mimetypes
from ..URLBase import URLBase from ..url import URLBase
from ..utils import parse_bool from ..utils import parse_bool
from ..common import ContentLocation from ..common import ContentLocation
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class AttachBase(URLBase): class AttachBase(URLBase):

View File

@ -28,9 +28,9 @@
import re import re
import os import os
from .AttachBase import AttachBase from .base import AttachBase
from ..common import ContentLocation from ..common import ContentLocation
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class AttachFile(AttachBase): class AttachFile(AttachBase):

View File

@ -31,10 +31,10 @@ import os
import requests import requests
import threading import threading
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
from .AttachBase import AttachBase from .base import AttachBase
from ..common import ContentLocation from ..common import ContentLocation
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class AttachHTTP(AttachBase): class AttachHTTP(AttachBase):

View File

@ -27,8 +27,8 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
# Used for testing # Used for testing
from .ConfigBase import ConfigBase from .base import ConfigBase
from ..ConfigurationManager import ConfigurationManager from ..manager_config import ConfigurationManager
# Initalize our Config Manager Singleton # Initalize our Config Manager Singleton
C_MGR = ConfigurationManager() C_MGR = ConfigurationManager()
@ -36,4 +36,5 @@ C_MGR = ConfigurationManager()
__all__ = [ __all__ = [
# Reference # Reference
'ConfigBase', 'ConfigBase',
'ConfigurationManager',
] ]

View File

@ -33,15 +33,15 @@ import time
from .. import plugins from .. import plugins
from .. import common from .. import common
from ..AppriseAsset import AppriseAsset from ..asset import AppriseAsset
from ..URLBase import URLBase from ..url import URLBase
from ..ConfigurationManager import ConfigurationManager
from ..utils import GET_SCHEMA_RE from ..utils import GET_SCHEMA_RE
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import parse_urls from ..utils import parse_urls
from ..utils import cwe312_url from ..utils import cwe312_url
from ..NotificationManager import NotificationManager from ..manager_config import ConfigurationManager
from ..manager_plugins import NotificationManager
# Test whether token is valid or not # Test whether token is valid or not
VALID_TOKEN = re.compile( VALID_TOKEN = re.compile(

View File

@ -28,10 +28,10 @@
import re import re
import os import os
from .ConfigBase import ConfigBase from .base import ConfigBase
from ..common import ConfigFormat from ..common import ConfigFormat
from ..common import ContentIncludeMode from ..common import ContentIncludeMode
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class ConfigFile(ConfigBase): class ConfigFile(ConfigBase):

View File

@ -28,11 +28,11 @@
import re import re
import requests import requests
from .ConfigBase import ConfigBase from .base import ConfigBase
from ..common import ConfigFormat from ..common import ConfigFormat
from ..common import ContentIncludeMode from ..common import ContentIncludeMode
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Support YAML formats # Support YAML formats
# text/yaml # text/yaml

View File

@ -26,8 +26,8 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
from .ConfigBase import ConfigBase from .base import ConfigBase
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class ConfigMemory(ConfigBase): class ConfigMemory(ConfigBase):

View File

@ -29,7 +29,7 @@
import re import re
from markdown import markdown from markdown import markdown
from .common import NotifyFormat from .common import NotifyFormat
from .URLBase import URLBase from .url import URLBase
from html.parser import HTMLParser from html.parser import HTMLParser

View File

@ -27,8 +27,8 @@
# POSSIBILITY OF SUCH DAMAGE.USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE.USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
from ..plugins.NotifyBase import NotifyBase from ..plugins.base import NotifyBase
from ..NotificationManager import NotificationManager from ..manager_plugins import NotificationManager
from ..utils import URL_DETAILS_RE from ..utils import URL_DETAILS_RE
from ..utils import parse_url from ..utils import parse_url
from ..utils import url_assembly from ..utils import url_assembly

View File

@ -26,7 +26,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
from .CustomNotifyPlugin import CustomNotifyPlugin from .base import CustomNotifyPlugin
def notify(on, name=None): def notify(on, name=None):

View File

@ -61,6 +61,9 @@ class PluginManager(metaclass=Singleton):
# The module path to scan # The module path to scan
module_path = join(abspath(dirname(__file__)), _id) module_path = join(abspath(dirname(__file__)), _id)
# For filtering our result when scanning a module
module_filter_re = re.compile(r'^(?P<name>((?!_)[A-Za-z0-9]+))$')
# thread safe loading # thread safe loading
_lock = threading.Lock() _lock = threading.Lock()
@ -177,7 +180,7 @@ class PluginManager(metaclass=Singleton):
# The .py extension is optional as we support loading directories # The .py extension is optional as we support loading directories
# too # too
module_re = re.compile( module_re = re.compile(
r'^(?P<name>' + self.fname_prefix + r'[a-z0-9]+)(\.py)?$', r'^(?P<name>(?!base|_)[a-z0-9_]+)(\.py)?$',
re.I) re.I)
t_start = time.time() t_start = time.time()
@ -188,10 +191,6 @@ class PluginManager(metaclass=Singleton):
# keep going # keep going
continue continue
elif match.group('name') == f'{self.fname_prefix}Base':
# keep going
continue
# Store our notification/plugin name: # Store our notification/plugin name:
module_name = match.group('name') module_name = match.group('name')
module_pyname = '{}.{}'.format(module_name_prefix, module_name) module_pyname = '{}.{}'.format(module_name_prefix, module_name)
@ -216,7 +215,47 @@ class PluginManager(metaclass=Singleton):
# logging found in import_module and not needed here # logging found in import_module and not needed here
continue continue
if not hasattr(module, module_name): module_class = None
for m_class in [obj for obj in dir(module)
if self.module_filter_re.match(obj)]:
# Get our plugin
plugin = getattr(module, m_class)
if not hasattr(plugin, 'app_id'):
# Filter out non-notification modules
logger.trace(
"(%s) import failed; no app_id defined in %s",
self.name, m_class, os.path.join(module_path, f))
continue
# Add our plugin name to our module map
self._module_map[module_name] = {
'plugin': set([plugin]),
'module': module,
'path': '{}.{}'.format(
module_name_prefix, module_name),
'native': True,
}
fn = getattr(plugin, 'schemas', None)
schemas = set([]) if not callable(fn) else fn(plugin)
# map our schema to our plugin
for schema in schemas:
if schema in self._schema_map:
logger.error(
"{} schema ({}) mismatch detected - {} to {}"
.format(self.name, schema, self._schema_map,
plugin))
continue
# Assign plugin
self._schema_map[schema] = plugin
# Store our class
module_class = m_class
break
if not module_class:
# Not a library we can load as it doesn't follow the simple # Not a library we can load as it doesn't follow the simple
# rule that the class must bear the same name as the # rule that the class must bear the same name as the
# notification file itself. # notification file itself.
@ -226,38 +265,6 @@ class PluginManager(metaclass=Singleton):
self.name, module_name, os.path.join(module_path, f)) self.name, module_name, os.path.join(module_path, f))
continue continue
# Get our plugin
plugin = getattr(module, module_name)
if not hasattr(plugin, 'app_id'):
# Filter out non-notification modules
logger.trace(
"(%s) import failed; no app_id defined in %s",
self.name, module_name, os.path.join(module_path, f))
continue
# Add our plugin name to our module map
self._module_map[module_name] = {
'plugin': set([plugin]),
'module': module,
'path': '{}.{}'.format(module_name_prefix, module_name),
'native': True,
}
fn = getattr(plugin, 'schemas', None)
schemas = set([]) if not callable(fn) else fn(plugin)
# map our schema to our plugin
for schema in schemas:
if schema in self._schema_map:
logger.error(
"{} schema ({}) mismatch detected - {} to {}"
.format(self.name, schema, self._schema_map,
plugin))
continue
# Assign plugin
self._schema_map[schema] = plugin
logger.trace( logger.trace(
'{} {} loaded in {:.6f}s'.format( '{} {} loaded in {:.6f}s'.format(
self.name, module_name, (time.time() - tl_start))) self.name, module_name, (time.time() - tl_start)))

View File

@ -26,6 +26,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
import re
from os.path import dirname from os.path import dirname
from os.path import abspath from os.path import abspath
from os.path import join from os.path import join
@ -52,3 +53,7 @@ class AttachmentManager(PluginManager):
# The module path to scan # The module path to scan
module_path = join(abspath(dirname(__file__)), _id) module_path = join(abspath(dirname(__file__)), _id)
# For filtering our result set
module_filter_re = re.compile(
r'^(?P<name>' + fname_prefix + r'(?!Base)[A-Za-z0-9]+)$')

View File

@ -26,6 +26,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
import re
from os.path import dirname from os.path import dirname
from os.path import abspath from os.path import abspath
from os.path import join from os.path import join
@ -52,3 +53,7 @@ class ConfigurationManager(PluginManager):
# The module path to scan # The module path to scan
module_path = join(abspath(dirname(__file__)), _id) module_path = join(abspath(dirname(__file__)), _id)
# For filtering our result set
module_filter_re = re.compile(
r'^(?P<name>' + fname_prefix + r'(?!Base)[A-Za-z0-9]+)$')

View File

@ -26,6 +26,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
import re
from os.path import dirname from os.path import dirname
from os.path import abspath from os.path import abspath
from os.path import join from os.path import join
@ -52,3 +53,8 @@ class NotificationManager(PluginManager):
# The module path to scan # The module path to scan
module_path = join(abspath(dirname(__file__)), _id) module_path = join(abspath(dirname(__file__)), _id)
# For filtering our result set
module_filter_re = re.compile(
r'^(?P<name>' + fname_prefix +
r'(?!Base|ImageSize|Type)[A-Za-z0-9]+)$')

View File

@ -30,7 +30,7 @@ import os
import copy import copy
# Used for testing # Used for testing
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NOTIFY_IMAGE_SIZES from ..common import NOTIFY_IMAGE_SIZES
@ -40,9 +40,9 @@ from ..utils import parse_list
from ..utils import cwe312_url from ..utils import cwe312_url
from ..utils import GET_SCHEMA_RE from ..utils import GET_SCHEMA_RE
from ..logger import logger from ..logger import logger
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..AppriseLocale import LazyTranslation from ..locale import LazyTranslation
from ..NotificationManager import NotificationManager from ..manager_plugins import NotificationManager
# Grant access to our Notification Manager Singleton # Grant access to our Notification Manager Singleton

View File

@ -31,12 +31,12 @@ import requests
from json import dumps from json import dumps
import base64 import base64
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class AppriseAPIMethod: class AppriseAPIMethod:

View File

@ -70,9 +70,9 @@
import socket import socket
import sys import sys
from itertools import chain from itertools import chain
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_call_sign from ..utils import is_call_sign
from ..utils import parse_call_sign from ..utils import parse_call_sign

View File

@ -32,13 +32,13 @@
import requests import requests
import json import json
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Sounds generated off of: https://github.com/Finb/Bark/tree/master/Sounds # Sounds generated off of: https://github.com/Finb/Bark/tree/master/Sounds

View File

@ -30,7 +30,7 @@ import asyncio
import re import re
from functools import partial from functools import partial
from ..URLBase import URLBase from ..url import URLBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_bool from ..utils import parse_bool
from ..common import NOTIFY_TYPES from ..common import NOTIFY_TYPES
@ -38,8 +38,8 @@ from ..common import NotifyFormat
from ..common import NOTIFY_FORMATS from ..common import NOTIFY_FORMATS
from ..common import OverflowMode from ..common import OverflowMode
from ..common import OVERFLOW_MODES from ..common import OVERFLOW_MODES
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..AppriseAttachment import AppriseAttachment from ..apprise_attachment import AppriseAttachment
class NotifyBase(URLBase): class NotifyBase(URLBase):

View File

@ -35,14 +35,14 @@ from hashlib import sha1
from itertools import chain from itertools import chain
from urllib.parse import urlparse from urllib.parse import urlparse
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import parse_list from ..utils import parse_list
from ..utils import validate_regex from ..utils import validate_regex
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Default to sending to all devices if nothing is specified # Default to sending to all devices if nothing is specified
DEFAULT_TAG = '@all' DEFAULT_TAG = '@all'

View File

@ -36,13 +36,13 @@ import re
import requests import requests
import json import json
from itertools import chain from itertools import chain
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_phone_no from ..utils import parse_phone_no
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
IS_GROUP_RE = re.compile( IS_GROUP_RE = re.compile(

View File

@ -35,13 +35,13 @@
# Messaging/post_messageSend # Messaging/post_messageSend
import requests import requests
import json import json
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_phone_no from ..utils import parse_phone_no
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyBulkVS(NotifyBase): class NotifyBulkVS(NotifyBase):

View File

@ -33,14 +33,14 @@
# #
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_phone_no from ..utils import parse_phone_no
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class BurstSMSCountryCode: class BurstSMSCountryCode:

View File

@ -35,10 +35,10 @@
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyChantify(NotifyBase): class NotifyChantify(NotifyBase):

View File

@ -43,13 +43,13 @@ import requests
from json import dumps from json import dumps
from base64 import b64encode from base64 import b64encode
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_phone_no from ..utils import parse_phone_no
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Extend HTTP Error Messages # Extend HTTP Error Messages
CLICKSEND_HTTP_ERROR_MAP = { CLICKSEND_HTTP_ERROR_MAP = {

View File

@ -29,11 +29,11 @@
import re import re
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class FORMPayloadField: class FORMPayloadField:

View File

@ -30,11 +30,11 @@ import requests
import base64 import base64
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class JSONPayloadField: class JSONPayloadField:

View File

@ -30,11 +30,11 @@ import re
import requests import requests
import base64 import base64
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class XMLPayloadField: class XMLPayloadField:

View File

@ -39,13 +39,13 @@ import requests
from json import dumps from json import dumps
from json import loads from json import loads
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_phone_no from ..utils import parse_phone_no
from ..utils import validate_regex from ..utils import validate_regex
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Extend HTTP Error Messages # Extend HTTP Error Messages
D7NETWORKS_HTTP_ERROR_MAP = { D7NETWORKS_HTTP_ERROR_MAP = {

View File

@ -51,9 +51,9 @@ from json import dumps
import requests import requests
from requests.auth import HTTPBasicAuth from requests.auth import HTTPBasicAuth
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_call_sign from ..utils import is_call_sign
from ..utils import parse_call_sign from ..utils import parse_call_sign

View File

@ -27,11 +27,11 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
import sys import sys
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Default our global support flag # Default our global support flag
NOTIFY_DBUS_SUPPORT_ENABLED = False NOTIFY_DBUS_SUPPORT_ENABLED = False

View File

@ -34,13 +34,13 @@ import base64
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyFormat from ..common import NotifyFormat
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Register at https://dingtalk.com # Register at https://dingtalk.com
# - Download their PC based software as it is the only way you can create # - Download their PC based software as it is the only way you can create

View File

@ -50,14 +50,14 @@ from datetime import timedelta
from datetime import datetime from datetime import datetime
from datetime import timezone from datetime import timezone
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyFormat from ..common import NotifyFormat
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..attachment.AttachBase import AttachBase from ..attachment.base import AttachBase
# Used to detect user/role IDs # Used to detect user/role IDs

View File

@ -41,12 +41,12 @@ from socket import error as SocketError
from datetime import datetime from datetime import datetime
from datetime import timezone from datetime import timezone
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyFormat, NotifyType from ..common import NotifyFormat, NotifyType
from ..conversion import convert_between from ..conversion import convert_between
from ..utils import is_ipaddr, is_email, parse_emails, is_hostname from ..utils import is_ipaddr, is_email, parse_emails, is_hostname
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..logger import logger from ..logger import logger
# Globally Default encoding mode set to Quoted Printable. # Globally Default encoding mode set to Quoted Printable.

View File

@ -34,12 +34,12 @@ import hashlib
from json import dumps from json import dumps
from json import loads from json import loads
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..utils import parse_bool from ..utils import parse_bool
from ..common import NotifyType from ..common import NotifyType
from .. import __version__ as VERSION from .. import __version__ as VERSION
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyEmby(NotifyBase): class NotifyEmby(NotifyBase):

View File

@ -37,10 +37,10 @@
import requests import requests
from json import loads from json import loads
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class Enigma2MessageType: class Enigma2MessageType:

View File

@ -50,15 +50,15 @@
# You will need this in order to send an apprise messag # You will need this in order to send an apprise messag
import requests import requests
from json import dumps from json import dumps
from ..NotifyBase import NotifyBase from ..base import NotifyBase
from ...common import NotifyType from ...common import NotifyType
from ...utils import validate_regex from ...utils import validate_regex
from ...utils import parse_list from ...utils import parse_list
from ...utils import parse_bool from ...utils import parse_bool
from ...utils import dict_full_update from ...utils import dict_full_update
from ...common import NotifyImageSize from ...common import NotifyImageSize
from ...AppriseAttachment import AppriseAttachment from ...apprise_attachment import AppriseAttachment
from ...AppriseLocale import gettext_lazy as _ from ...locale import gettext_lazy as _
from .common import (FCMMode, FCM_MODES) from .common import (FCMMode, FCM_MODES)
from .priority import (FCM_PRIORITIES, FCMPriorityManager) from .priority import (FCM_PRIORITIES, FCMPriorityManager)
from .color import FCMColorManager from .color import FCMColorManager

View File

@ -36,7 +36,7 @@
import re import re
from ...utils import parse_bool from ...utils import parse_bool
from ...common import NotifyType from ...common import NotifyType
from ...AppriseAsset import AppriseAsset from ...asset import AppriseAsset
class FCMColorManager: class FCMColorManager:

View File

@ -36,10 +36,10 @@
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyFeishu(NotifyBase): class NotifyFeishu(NotifyBase):

View File

@ -44,14 +44,14 @@ import re
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyFormat from ..common import NotifyFormat
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Extend HTTP Error Messages # Extend HTTP Error Messages

View File

@ -36,9 +36,9 @@
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyFreeMobile(NotifyBase): class NotifyFreeMobile(NotifyBase):

View File

@ -26,11 +26,11 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Default our global support flag # Default our global support flag
NOTIFY_GNOME_SUPPORT_ENABLED = False NOTIFY_GNOME_SUPPORT_ENABLED = False

View File

@ -58,11 +58,11 @@ import re
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyFormat from ..common import NotifyFormat
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyGoogleChat(NotifyBase): class NotifyGoogleChat(NotifyBase):

View File

@ -34,10 +34,10 @@
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType, NotifyFormat from ..common import NotifyType, NotifyFormat
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Priorities # Priorities

View File

@ -26,12 +26,12 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Default our global support flag # Default our global support flag
NOTIFY_GROWL_SUPPORT_ENABLED = False NOTIFY_GROWL_SUPPORT_ENABLED = False

View File

@ -45,10 +45,11 @@
# #
import re import re
from .NotifyDiscord import NotifyDiscord # Import namespace so the class won't conflict with the actual Notify object
from . import discord
class NotifyGuilded(NotifyDiscord): class NotifyGuilded(discord.NotifyDiscord):
""" """
A wrapper to Guilded Notifications A wrapper to Guilded Notifications

View File

@ -34,11 +34,11 @@ from json import dumps
from uuid import uuid4 from uuid import uuid4
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyHomeAssistant(NotifyBase): class NotifyHomeAssistant(NotifyBase):

View File

@ -31,12 +31,12 @@
# https://httpsms.com # https://httpsms.com
import requests import requests
import json import json
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_phone_no from ..utils import parse_phone_no
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyHttpSMS(NotifyBase): class NotifyHttpSMS(NotifyBase):

View File

@ -44,11 +44,11 @@ import re
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyIFTTT(NotifyBase): class NotifyIFTTT(NotifyBase):

View File

@ -39,13 +39,13 @@
import re import re
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Extend HTTP Error Messages # Extend HTTP Error Messages
JOIN_HTTP_ERROR_MAP = { JOIN_HTTP_ERROR_MAP = {

View File

@ -38,12 +38,12 @@
import requests import requests
from json import loads from json import loads
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_phone_no from ..utils import parse_phone_no
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Extend HTTP Error Messages # Extend HTTP Error Messages
# Based on https://kavenegar.com/rest.html # Based on https://kavenegar.com/rest.html

View File

@ -39,10 +39,10 @@
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Extend HTTP Error Messages # Extend HTTP Error Messages
KUMULOS_HTTP_ERROR_MAP = { KUMULOS_HTTP_ERROR_MAP = {

View File

@ -90,10 +90,10 @@
import re import re
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..utils import is_hostname from ..utils import is_hostname
from ..utils import is_ipaddr from ..utils import is_ipaddr

View File

@ -33,14 +33,14 @@ import requests
import re import re
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..utils import validate_regex from ..utils import validate_regex
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Used to break path apart into list of streams # Used to break path apart into list of streams

View File

@ -33,15 +33,15 @@ import re
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..utils import parse_list from ..utils import parse_list
from ..utils import is_hostname from ..utils import is_hostname
from ..utils import is_ipaddr from ..utils import is_ipaddr
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..URLBase import PrivacyMode from ..url import PrivacyMode
class LunaSeaMode: class LunaSeaMode:

View File

@ -30,11 +30,11 @@ import platform
import subprocess import subprocess
import os import os
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Default our global support flag # Default our global support flag
NOTIFY_MACOSX_SUPPORT_ENABLED = False NOTIFY_MACOSX_SUPPORT_ENABLED = False

View File

@ -56,7 +56,7 @@
# #
import requests import requests
from email.utils import formataddr from email.utils import formataddr
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyFormat from ..common import NotifyFormat
from ..utils import parse_emails from ..utils import parse_emails
@ -64,7 +64,7 @@ from ..utils import parse_bool
from ..utils import is_email from ..utils import is_email
from ..utils import validate_regex from ..utils import validate_regex
from ..logger import logger from ..logger import logger
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Provide some known codes Mailgun uses and what they translate to: # Provide some known codes Mailgun uses and what they translate to:
# Based on https://documentation.mailgun.com/en/latest/api-intro.html#errors # Based on https://documentation.mailgun.com/en/latest/api-intro.html#errors

View File

@ -33,16 +33,16 @@ from json import dumps, loads
from datetime import datetime from datetime import datetime
from datetime import timezone from datetime import timezone
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyFormat from ..common import NotifyFormat
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..attachment.AttachBase import AttachBase from ..attachment.base import AttachBase
# Accept: # Accept:
# - @username # - @username

View File

@ -37,8 +37,8 @@ from json import dumps
from json import loads from json import loads
from time import time from time import time
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyFormat from ..common import NotifyFormat
@ -46,7 +46,7 @@ from ..utils import parse_bool
from ..utils import parse_list from ..utils import parse_list
from ..utils import is_hostname from ..utils import is_hostname
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Define default path # Define default path
MATRIX_V1_WEBHOOK_PATH = '/api/v1/matrix/hook' MATRIX_V1_WEBHOOK_PATH = '/api/v1/matrix/hook'

View File

@ -39,13 +39,13 @@
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import parse_list from ..utils import parse_list
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Some Reference Locations: # Some Reference Locations:
# - https://docs.mattermost.com/developer/webhooks-incoming.html # - https://docs.mattermost.com/developer/webhooks-incoming.html

View File

@ -34,12 +34,12 @@
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_phone_no from ..utils import parse_phone_no
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyMessageBird(NotifyBase): class NotifyMessageBird(NotifyBase):

View File

@ -47,10 +47,10 @@
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class MisskeyVisibility: class MisskeyVisibility:

View File

@ -38,12 +38,12 @@ import re
from time import sleep from time import sleep
from datetime import datetime from datetime import datetime
from os.path import isfile from os.path import isfile
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Default our global support flag # Default our global support flag
NOTIFY_MQTT_SUPPORT_ENABLED = False NOTIFY_MQTT_SUPPORT_ENABLED = False

View File

@ -38,12 +38,12 @@
import re import re
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_phone_no, parse_bool from ..utils import parse_phone_no, parse_bool
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class MSG91PayloadField: class MSG91PayloadField:

View File

@ -81,7 +81,7 @@ import requests
import json import json
from json.decoder import JSONDecodeError from json.decoder import JSONDecodeError
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyFormat from ..common import NotifyFormat
@ -89,8 +89,8 @@ from ..utils import parse_bool
from ..utils import validate_regex from ..utils import validate_regex
from ..utils import apply_template from ..utils import apply_template
from ..utils import TemplateType from ..utils import TemplateType
from ..AppriseAttachment import AppriseAttachment from ..apprise_attachment import AppriseAttachment
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyMSTeams(NotifyBase): class NotifyMSTeams(NotifyBase):

View File

@ -28,11 +28,11 @@
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyNextcloud(NotifyBase): class NotifyNextcloud(NotifyBase):

View File

@ -29,11 +29,11 @@
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyNextcloudTalk(NotifyBase): class NotifyNextcloudTalk(NotifyBase):

View File

@ -43,11 +43,11 @@
import re import re
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NoticaMode: class NoticaMode:

View File

@ -31,9 +31,9 @@ import requests
from json import dumps from json import dumps
from itertools import chain from itertools import chain
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..utils import parse_list, parse_bool from ..utils import parse_list, parse_bool
from ..utils import validate_regex from ..utils import validate_regex

View File

@ -44,11 +44,11 @@
import re import re
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotificoFormat: class NotificoFormat:

View File

@ -41,18 +41,18 @@ from json import loads
from json import dumps from json import dumps
from os.path import basename from os.path import basename
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyFormat from ..common import NotifyFormat
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import is_hostname from ..utils import is_hostname
from ..utils import is_ipaddr from ..utils import is_ipaddr
from ..utils import validate_regex from ..utils import validate_regex
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..attachment.AttachBase import AttachBase from ..attachment.base import AttachBase
class NtfyMode: class NtfyMode:

View File

@ -64,14 +64,14 @@ from datetime import datetime
from datetime import timedelta from datetime import timedelta
from json import loads from json import loads
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyFormat from ..common import NotifyFormat
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_email from ..utils import is_email
from ..utils import parse_emails from ..utils import parse_emails
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyOffice365(NotifyBase): class NotifyOffice365(NotifyBase):

View File

@ -37,14 +37,14 @@ import requests
from json import dumps from json import dumps
from itertools import chain from itertools import chain
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..utils import validate_regex from ..utils import validate_regex
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import is_email from ..utils import is_email
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class OneSignalCategory: class OneSignalCategory:

View File

@ -49,13 +49,13 @@
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..utils import is_uuid from ..utils import is_uuid
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class OpsgenieCategory(NotifyBase): class OpsgenieCategory(NotifyBase):

View File

@ -34,13 +34,13 @@
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..common import NotifyImageSize from ..common import NotifyImageSize
from ..utils import validate_regex from ..utils import validate_regex
from ..utils import parse_bool from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class PagerDutySeverity: class PagerDutySeverity:

View File

@ -31,11 +31,11 @@ from json import dumps
from uuid import uuid4 from uuid import uuid4
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Actions # Actions

View File

@ -30,10 +30,10 @@ import re
import requests import requests
from json import dumps from json import dumps
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Used to break path apart into list of targets # Used to break path apart into list of targets
TARGET_LIST_DELIM = re.compile(r'[ \t\r\n,\\/]+') TARGET_LIST_DELIM = re.compile(r'[ \t\r\n,\\/]+')

View File

@ -28,14 +28,14 @@
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import is_email from ..utils import is_email
from ..utils import is_phone_no from ..utils import is_phone_no
from ..utils import parse_list from ..utils import parse_list
from ..utils import parse_bool from ..utils import parse_bool
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
class NotifyPopcornNotify(NotifyBase): class NotifyPopcornNotify(NotifyBase):

View File

@ -28,10 +28,10 @@
import requests import requests
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..common import NotifyType from ..common import NotifyType
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Priorities # Priorities

View File

@ -30,13 +30,13 @@ import requests
from json import dumps from json import dumps
from json import loads from json import loads
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..utils import is_email from ..utils import is_email
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
from ..attachment.AttachBase import AttachBase from ..attachment.base import AttachBase
# Flag used as a placeholder to sending to all devices # Flag used as a placeholder to sending to all devices
PUSHBULLET_SEND_TO_ALL = 'ALL_DEVICES' PUSHBULLET_SEND_TO_ALL = 'ALL_DEVICES'

View File

@ -29,9 +29,9 @@
import requests import requests
from ..common import NotifyType from ..common import NotifyType
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Syntax: # Syntax:
# schan://{key}/ # schan://{key}/

View File

@ -31,12 +31,12 @@ import requests
from json import dumps from json import dumps
from itertools import chain from itertools import chain
from .NotifyBase import NotifyBase from .base import NotifyBase
from ..URLBase import PrivacyMode from ..url import PrivacyMode
from ..common import NotifyType from ..common import NotifyType
from ..utils import parse_list from ..utils import parse_list
from ..utils import validate_regex from ..utils import validate_regex
from ..AppriseLocale import gettext_lazy as _ from ..locale import gettext_lazy as _
# Used to detect and parse channels # Used to detect and parse channels
IS_CHANNEL = re.compile(r'^#?(?P<name>[A-Za-z0-9]+)$') IS_CHANNEL = re.compile(r'^#?(?P<name>[A-Za-z0-9]+)$')

Some files were not shown because too many files have changed in this diff Show More