python-ntfy 0.4.1__tar.gz → 0.4.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-ntfy
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: An ntfy library aiming for feature completeness
5
5
  Home-page: https://github.com/MatthewCane/python-ntfy
6
6
  License: MIT
@@ -93,7 +93,7 @@ These tools are also run in the CI pipeline and must pass before merging.
93
93
 
94
94
  ### Tests
95
95
 
96
- This project is aiming for 95% code coverage. Any added features must include comprihensive tests.
96
+ This project is aiming for 95% code coverage. Any added features must include comprehensive tests.
97
97
 
98
98
  #### Testing Steps
99
99
 
@@ -73,7 +73,7 @@ These tools are also run in the CI pipeline and must pass before merging.
73
73
 
74
74
  ### Tests
75
75
 
76
- This project is aiming for 95% code coverage. Any added features must include comprihensive tests.
76
+ This project is aiming for 95% code coverage. Any added features must include comprehensive tests.
77
77
 
78
78
  #### Testing Steps
79
79
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-ntfy"
3
- version = "0.4.1"
3
+ version = "0.4.2"
4
4
  description = "An ntfy library aiming for feature completeness"
5
5
  authors = ["Matthew Cane <matthew.cane0@gmail.com>"]
6
6
  readme = "README.md"
@@ -0,0 +1,3 @@
1
+ from ._ntfy import NtfyClient as NtfyClient
2
+
3
+ __all__ = ["NtfyClient"]
@@ -11,24 +11,36 @@ Typical usage example:
11
11
 
12
12
  import os
13
13
 
14
+ from ._get_functions import get_cached_messages
15
+ from ._send_functions import (
16
+ BroadcastAction,
17
+ HttpAction,
18
+ MessagePriority,
19
+ ViewAction,
20
+ send,
21
+ send_file,
22
+ )
23
+
24
+
25
+ class GetFunctionsMixin:
26
+ """Mixin for getting messages."""
27
+
28
+ get_cached_messages = get_cached_messages
14
29
 
15
- class NtfyClient:
16
- """A class for interacting with the ntfy notification service."""
17
30
 
18
- # The functions need to be imported here to:
19
- # 1. Keep the functions in a separate file
20
- # 2. Keep the docstrings working in the IDE
21
- # 3. Allow the functions to be called with self
22
- # MyPy does not like this, but it works
23
- from ._get_functions import get_cached_messages # type: ignore
24
- from ._send_functions import ( # type: ignore
25
- BroadcastAction,
26
- HttpAction,
27
- MessagePriority,
28
- ViewAction,
29
- send,
30
- send_file,
31
- )
31
+ class SendFunctionsMixin:
32
+ """Mixin for sending messages."""
33
+
34
+ send = send
35
+ send_file = send_file
36
+ BroadcastAction = BroadcastAction
37
+ HttpAction = HttpAction
38
+ MessagePriority = MessagePriority
39
+ ViewAction = ViewAction
40
+
41
+
42
+ class NtfyClient(GetFunctionsMixin, SendFunctionsMixin):
43
+ """A class for interacting with the ntfy notification service."""
32
44
 
33
45
  def __init__(
34
46
  self,
File without changes