Skip to content

Commit 5e6c631

Browse files
committed
fix: can't import notify
1 parent 21456c9 commit 5e6c631

File tree

7 files changed

+41
-7
lines changed

7 files changed

+41
-7
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
1-
# pypush
1+
# ipush
22

33
APP 推送通知
44

5+
## 使用说明
6+
7+
1. 安装依赖
8+
9+
```shell
10+
pip install -U ipush
11+
```
12+
13+
2. 创建 `notify` 对象,并发送消息
14+
15+
```python
16+
from ipush.notify.dingtalk import Dingtalk
17+
from ipush.notify.feishu import Feishu
18+
from ipush.notify.lark import Lark
19+
20+
notify = Dingtalk("token", "secret")
21+
notify.send("ipush test")
22+
23+
notify = Feishu("token", "secret")
24+
notify.send("ipush test")
25+
26+
notify = Lark("token", "secret")
27+
notify.send("ipush test")
28+
```
29+
530
## 支持平台
631

732
| 状态 | **国内**平台 | 官网 | 文档 | 备注 |
@@ -26,3 +51,9 @@ python -m pytest
2651
# 打印测试报告
2752
python -m pytest -s
2853
```
54+
55+
## 仓库镜像
56+
57+
- https://git.jetsung.com/idev/pypush
58+
- https://framagit.org/idev/pypush
59+
- https://github.com/idevsig/pypush

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ipush"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = "Push for python"
55
authors = [
66
{ name = "Jetsung Chan", email = "[email protected]" }
@@ -54,7 +54,7 @@ check = { cmd = "python -m ruff check . --fix" }
5454
allow-direct-references = true
5555

5656
[tool.hatch.build.targets.wheel]
57-
packages = ["src/push"]
57+
packages = ["src/ipush"]
5858

5959
[tool.pytest.ini_options]
6060
testpaths = ["tests"]

src/ipush/__init__.py

Whitespace-only changes.

tests/test_dingtalk.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import os
22

33
import pytest
4-
from src.ipush.notify.dingtalk import Dingtalk
4+
5+
from ipush.notify.dingtalk import Dingtalk
56

67

78
@pytest.fixture

tests/test_feishu.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import os
22

33
import pytest
4-
from src.ipush.notify.feishu import Feishu
4+
5+
from ipush.notify.feishu import Feishu
56

67

78
@pytest.fixture

tests/test_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from urllib.parse import unquote
22

3-
from src.ipush.utils.helper import signature
3+
from ipush.utils.helper import signature
44

55

66
class TestHelper:

tests/test_lark.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import os
22

33
import pytest
4-
from src.ipush.notify.lark import Lark
4+
5+
from ipush.notify.lark import Lark
56

67

78
@pytest.fixture

0 commit comments

Comments
 (0)