Bark encrypted push client
Project description
Encrypted Push Notification Client for Bark / Bark加密推送通知客户端
Features / 特性
- 支持 AES-128/192/256
- 支持 加密策略(CBC / ECB,可扩展 GCM 等)
Installation / 安装
pip3 install bark-python
或者
git clone https://github.com/horennel/bark-python.git
python3 setup.py install
Usage / 用法示例
from bark_python import BarkClient, CBCStrategy, EncryptionStrategy
client = BarkClient(device_key="your_device_key", api_url="https://api.day.app")
# 设置加密方式(可选,默认明文)
client.set_encryption(
key="1234567890abcdef", # 必须是 16/24/32 字符
iv="abcdef1234567890", # 必须是 16 字符
strategy_cls=CBCStrategy # 也可以用 ECBStrategy,或者自己扩展
)
# 发送推送通知
client.send_notification(
title="🔒 Secure Title",
body="Hello from encrypted Bark client!",
sound="shake"
)
# 自定义加密算法(可选)
class MyNewStrategy(EncryptionStrategy):
def encrypt(self, key: bytes, iv: bytes, data: str) -> bytes:
pass
Credits / 致谢
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bark_python-0.0.2.tar.gz
(5.0 kB
view details)
File details
Details for the file bark_python-0.0.2.tar.gz.
File metadata
- Download URL: bark_python-0.0.2.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a08729ccaa74838f54d238bf73548d236ea7f3dff5cb4e4a6390129a8449b1d
|
|
| MD5 |
f07fd6b3fd95b82b58f03dd5197b65aa
|
|
| BLAKE2b-256 |
e100862cb50e81c472144774cb8bc1644773da97656b8f07ecc3ba30264e7c0d
|