File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change
1
+ from usepy import useNotify , useNotifyChannels
2
+
3
+ notify = useNotify ()
4
+ notify .add (
5
+ useNotifyChannels .Bark ({"token" : "jtgTe64kJAtq4iyj6DaepQ" }),
6
+ )
7
+
8
+ notify .publish (content = "usepy" )
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " usepy"
3
- version = " 0.1.34 "
3
+ version = " 0.1.35 "
4
4
description = " usepy"
5
5
homepage = " https://usepy.code05.com/"
6
6
authors = [" miclon <jcnd@163.com>" ]
@@ -24,6 +24,12 @@ uvicorn = "^0.20.0"
24
24
[tool .poetry .group .dev .dependencies ]
25
25
black = " ^23.1.0"
26
26
27
+ [tool .poetry .extras ]
28
+ notify = [" usepy-plugin-notify" ]
29
+
30
+ [tool .poetry .group .notify .dependencies ]
31
+ usepy-plugin-notify = " ^0.2.2"
32
+
27
33
[build-system ]
28
34
requires = [" poetry-core" ]
29
35
build-backend = " poetry.core.masonry.api"
Original file line number Diff line number Diff line change 48
48
)
49
49
from .utils .bloom_filter import BloomFilter as useBloomFilter
50
50
51
+ try :
52
+ from notify import useNotify , channels as useNotifyChannels
53
+ except ImportError :
54
+ raise ModuleNotFoundError (
55
+ "You need install the 'usepy_plugin_notify' module before use 'useNotify'"
56
+ )
57
+
51
58
__all__ = [
52
59
# data
53
60
'useDict' ,
89
96
'useDateTime' ,
90
97
'usePath' ,
91
98
'useThread' ,
99
+
100
+ # plugins
101
+ 'useNotify' ,
102
+ 'useNotifyChannels' ,
92
103
]
You can’t perform that action at this time.
0 commit comments