python-ntfy 0.2.5__tar.gz → 0.3.5__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.
- {python_ntfy-0.2.5 → python_ntfy-0.3.5}/PKG-INFO +2 -2
- {python_ntfy-0.2.5 → python_ntfy-0.3.5}/pyproject.toml +1 -1
- {python_ntfy-0.2.5 → python_ntfy-0.3.5}/python_ntfy/__init__.py +5 -0
- {python_ntfy-0.2.5 → python_ntfy-0.3.5}/LICENSE +0 -0
- {python_ntfy-0.2.5 → python_ntfy-0.3.5}/README.md +1 -1
- {python_ntfy-0.2.5 → python_ntfy-0.3.5}/python_ntfy/_get_functions.py +0 -0
- {python_ntfy-0.2.5 → python_ntfy-0.3.5}/python_ntfy/_send_functions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-ntfy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: An ntfy library aiming for feature completeness
|
|
5
5
|
Home-page: https://github.com/MatthewCane/python-ntfy
|
|
6
6
|
License: MIT
|
|
@@ -49,6 +49,7 @@ See the full documentation site at [https://matthewcane.github.io/python-ntfy/](
|
|
|
49
49
|
## Supported Features
|
|
50
50
|
|
|
51
51
|
- Username + password auth
|
|
52
|
+
- Access token auth
|
|
52
53
|
- Custom servers
|
|
53
54
|
- Sending plaintext messages
|
|
54
55
|
- Sending Markdown formatted text messages
|
|
@@ -59,7 +60,6 @@ See the full documentation site at [https://matthewcane.github.io/python-ntfy/](
|
|
|
59
60
|
|
|
60
61
|
## Future Features
|
|
61
62
|
|
|
62
|
-
- Access token auth
|
|
63
63
|
- Email notifications
|
|
64
64
|
- Send to multiple topics at once
|
|
65
65
|
|
|
@@ -32,10 +32,15 @@ class NtfyClient:
|
|
|
32
32
|
self._topic = topic
|
|
33
33
|
self.__set_url(self._server, topic)
|
|
34
34
|
|
|
35
|
+
# If the user has set the user and password, use that
|
|
36
|
+
# If the user has set the token, use that
|
|
37
|
+
# Otherwise, use an empty user and token
|
|
35
38
|
if (user := os.environ.get("NTFY_USER")) and (
|
|
36
39
|
password := os.environ.get("NTFY_PASSWORD")
|
|
37
40
|
):
|
|
38
41
|
self._auth = (user, password)
|
|
42
|
+
elif token := os.environ.get("NTFY_TOKEN"):
|
|
43
|
+
self._auth = ("", token)
|
|
39
44
|
else:
|
|
40
45
|
self._auth = ("", "")
|
|
41
46
|
|
|
File without changes
|
|
@@ -27,6 +27,7 @@ See the full documentation site at [https://matthewcane.github.io/python-ntfy/](
|
|
|
27
27
|
## Supported Features
|
|
28
28
|
|
|
29
29
|
- Username + password auth
|
|
30
|
+
- Access token auth
|
|
30
31
|
- Custom servers
|
|
31
32
|
- Sending plaintext messages
|
|
32
33
|
- Sending Markdown formatted text messages
|
|
@@ -37,7 +38,6 @@ See the full documentation site at [https://matthewcane.github.io/python-ntfy/](
|
|
|
37
38
|
|
|
38
39
|
## Future Features
|
|
39
40
|
|
|
40
|
-
- Access token auth
|
|
41
41
|
- Email notifications
|
|
42
42
|
- Send to multiple topics at once
|
|
43
43
|
|
|
File without changes
|
|
File without changes
|