ix-notifiers 0.3.1765283483__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,45 @@
1
+ Metadata-Version: 2.1
2
+ Name: ix-notifiers
3
+ Version: 0.5.0
4
+ Summary: A python library for notifiers
5
+ Author-email: Alex Thomae <notifiers@egos.tech>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2020-2025 ix.ai, egos.tech
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://gitlab.com/egos-tech/notifiers
29
+ Classifier: Programming Language :: Python :: 3
30
+ Classifier: Operating System :: OS Independent
31
+ Requires-Python: >=3.6
32
+ Description-Content-Type: text/markdown
33
+ License-File: LICENSE
34
+ Requires-Dist: requests==2.32.2
35
+
36
+ # ix-notifiers
37
+
38
+ A python library for sending notifications. Used in the [egos-tech](https://gitlab.com/egos-tech) projects such as:
39
+
40
+ - [/egos-tech/alertmanager-notifier](https://gitlab.com/egos-tech/alertmanager-notifier)
41
+ - [/egos-tech/cioban](https://gitlab.com/egos-tech/cioban)
42
+
43
+ ## Usage
44
+
45
+ See [notifiers.py](https://gitlab.com/egos-tech/alertmanager-notifier/-/blob/main/alertmanager-notifier/lib/notifiers.py) for an usage example.
@@ -3,5 +3,6 @@
3
3
  """ Constants declarations """
4
4
 
5
5
  # These get overwritten at build time. See build.sh
6
- VERSION = '0.3'
7
- BUILD = '1765283483'
6
+ VERSION = '0.5.0'
7
+ BUILD = None
8
+ NAME = 'ix-notifiers'
@@ -4,9 +4,9 @@
4
4
 
5
5
  import logging
6
6
  import importlib
7
+ from .constants import NAME
7
8
 
8
- log = logging.getLogger(__package__)
9
-
9
+ log = logging.getLogger(NAME)
10
10
 
11
11
  class IxNotifiers():
12
12
  """ the IxNotifiers class """
@@ -45,9 +45,8 @@ class IxNotifiers():
45
45
  success = True
46
46
  return success
47
47
 
48
-
49
48
  class Notifier():
50
- """ The base class for all notifiers """
49
+ """ The base class, extended by notifiers """
51
50
 
52
51
  settings = {}
53
52
  params = {}
@@ -6,16 +6,14 @@ import logging
6
6
  from urllib.parse import urljoin
7
7
  import requests
8
8
  from .core import Notifier
9
- from . import constants
10
-
11
- log = logging.getLogger(__package__)
9
+ from .constants import NAME, BUILD, VERSION
12
10
 
11
+ log = logging.getLogger(NAME)
13
12
 
14
13
  def start(**kwargs):
15
14
  """ Returns an instance of the GotifyNotifier """
16
15
  return GotifyNotifier(**kwargs)
17
16
 
18
-
19
17
  class GotifyNotifier(Notifier):
20
18
  """ The GotifyNotifier class """
21
19
  params = {
@@ -54,7 +52,7 @@ class GotifyNotifier(Notifier):
54
52
  success = True
55
53
  headers = {
56
54
  'X-Gotify-Key': self.settings['token'],
57
- 'user-agent': f'{__package__} {constants.VERSION}.{constants.BUILD}',
55
+ 'user-agent': f'{__package__} {VERSION}.{BUILD}',
58
56
  }
59
57
  # Allow per message override of content_type
60
58
  extras = {
@@ -4,9 +4,9 @@
4
4
 
5
5
  import logging
6
6
  from .core import Notifier
7
+ from .constants import NAME
7
8
 
8
- log = logging.getLogger(__package__)
9
-
9
+ log = logging.getLogger(NAME)
10
10
 
11
11
  def start(**kwargs):
12
12
  """ Returns an instance of NullNotifier """
@@ -0,0 +1,45 @@
1
+ Metadata-Version: 2.1
2
+ Name: ix-notifiers
3
+ Version: 0.5.0
4
+ Summary: A python library for notifiers
5
+ Author-email: Alex Thomae <notifiers@egos.tech>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2020-2025 ix.ai, egos.tech
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://gitlab.com/egos-tech/notifiers
29
+ Classifier: Programming Language :: Python :: 3
30
+ Classifier: Operating System :: OS Independent
31
+ Requires-Python: >=3.6
32
+ Description-Content-Type: text/markdown
33
+ License-File: LICENSE
34
+ Requires-Dist: requests==2.32.2
35
+
36
+ # ix-notifiers
37
+
38
+ A python library for sending notifications. Used in the [egos-tech](https://gitlab.com/egos-tech) projects such as:
39
+
40
+ - [/egos-tech/alertmanager-notifier](https://gitlab.com/egos-tech/alertmanager-notifier)
41
+ - [/egos-tech/cioban](https://gitlab.com/egos-tech/cioban)
42
+
43
+ ## Usage
44
+
45
+ See [notifiers.py](https://gitlab.com/egos-tech/alertmanager-notifier/-/blob/main/alertmanager-notifier/lib/notifiers.py) for an usage example.
@@ -1,5 +1,7 @@
1
1
  LICENSE
2
2
  README.md
3
+ pyproject.toml
4
+ requirements.txt
3
5
  setup.py
4
6
  ix_notifiers/__init__.py
5
7
  ix_notifiers/constants.py
@@ -0,0 +1 @@
1
+ requests==2.32.2
@@ -0,0 +1,26 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools >= 77.0.3"
4
+ ]
5
+ build-backend = "setuptools.build_meta"
6
+
7
+ [project]
8
+ authors = [
9
+ {name = "Alex Thomae", email = "notifiers@egos.tech"},
10
+ ]
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3",
13
+ "Operating System :: OS Independent",
14
+ ]
15
+ description = "A python library for notifiers"
16
+ dynamic = ["version", "dependencies"]
17
+ name = "ix-notifiers"
18
+ license = { file = "LICENSE" }
19
+ readme = "README.md"
20
+ requires-python = ">=3.6"
21
+
22
+ [project.urls]
23
+ Homepage = "https://gitlab.com/egos-tech/notifiers"
24
+
25
+ [tool.setuptools.dynamic]
26
+ dependencies = {file = ["requirements.txt"]}
@@ -0,0 +1 @@
1
+ requests==2.32.2
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """ setup.py for pypi """
4
+
5
+ import os
6
+ import setuptools
7
+ try:
8
+ from ix_notifiers.constants import VERSION, BUILD
9
+ except ModuleNotFoundError:
10
+ VERSION = '0.5.0'
11
+ BUILD = None
12
+
13
+ with open("README.md", "r", encoding="utf-8") as fh:
14
+ long_description = fh.read()
15
+
16
+ version = VERSION
17
+
18
+ if BUILD:
19
+ version += f'.{BUILD}'
20
+
21
+ requirement_path = f"{os.path.dirname(os.path.realpath(__file__))}/requirements.txt"
22
+ install_requires = []
23
+ if os.path.isfile(requirement_path):
24
+ with open(requirement_path, 'r', encoding='utf8') as f:
25
+ install_requires = f.read().splitlines()
26
+
27
+ setuptools.setup(version=version)
@@ -1,26 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ix-notifiers
3
- Version: 0.3.1765283483
4
- Summary: A python library for notifiers
5
- Home-page: https://gitlab.com/egos-tech/notifiers
6
- Author: ix.ai
7
- Author-email: notifiers@egos.tech
8
- License: MIT License
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.6
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Requires-Dist: requests==2.32.3
16
-
17
- # ix-notifiers
18
-
19
- A python library for sending notifications. Used in the [egos-tech](https://gitlab.com/egos-tech) projects such as:
20
-
21
- - [/egos-tech/alertmanager-notifier](https://gitlab.com/egos-tech/alertmanager-notifier)
22
- - [/egos-tech/cioban](https://gitlab.com/egos-tech/cioban)
23
-
24
- ## Usage
25
-
26
- See [notifiers.py](https://gitlab.com/egos-tech/alertmanager-notifier/-/blob/main/alertmanager-notifier/lib/notifiers.py) for an usage example.
@@ -1,26 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ix-notifiers
3
- Version: 0.3.1765283483
4
- Summary: A python library for notifiers
5
- Home-page: https://gitlab.com/egos-tech/notifiers
6
- Author: ix.ai
7
- Author-email: notifiers@egos.tech
8
- License: MIT License
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.6
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Requires-Dist: requests==2.32.3
16
-
17
- # ix-notifiers
18
-
19
- A python library for sending notifications. Used in the [egos-tech](https://gitlab.com/egos-tech) projects such as:
20
-
21
- - [/egos-tech/alertmanager-notifier](https://gitlab.com/egos-tech/alertmanager-notifier)
22
- - [/egos-tech/cioban](https://gitlab.com/egos-tech/cioban)
23
-
24
- ## Usage
25
-
26
- See [notifiers.py](https://gitlab.com/egos-tech/alertmanager-notifier/-/blob/main/alertmanager-notifier/lib/notifiers.py) for an usage example.
@@ -1 +0,0 @@
1
- requests==2.32.3
@@ -1,31 +0,0 @@
1
- #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
- """ setup.py for pypi """
4
-
5
- import setuptools
6
- from ix_notifiers import constants
7
-
8
- with open("README.md", "r", encoding="utf-8") as fh:
9
- long_description = fh.read()
10
-
11
- setuptools.setup(
12
- name="ix-notifiers",
13
- version=f"{constants.VERSION}.{constants.BUILD}",
14
- author="ix.ai",
15
- author_email="notifiers@egos.tech",
16
- description="A python library for notifiers",
17
- long_description=long_description,
18
- long_description_content_type="text/markdown",
19
- license='MIT License',
20
- url="https://gitlab.com/egos-tech/notifiers",
21
- packages=setuptools.find_packages(),
22
- classifiers=[
23
- "Programming Language :: Python :: 3",
24
- "License :: OSI Approved :: MIT License",
25
- "Operating System :: OS Independent",
26
- ],
27
- python_requires='>=3.6',
28
- install_requires=[
29
- 'requests==2.32.3',
30
- ],
31
- )