Really Good Things(RGT)
这是一个Python的工具包,封装了一些常用的函数
安装初始化
uv add really-good-things
或
pip install really-good-things
Security模块
from rgt.security import HashUtils,JWTManager,AESECBManager
# Hash加密,比如用于密码储存和验证
password = "password"
hashed = HashUtils.hash(password)
HashUtils.verify(password,hashed)
# 生成和解密JWT
jwt_key = "IbFj9EMYb01U3kSx4R64Pb0Sb60MDkCWLkUEibC821w="
exp_min = 60
jwt_obj = JWTManager(jwt_key,exp_min)
token = jwt_obj.encode(user_id=1234567890)
payload = jwt_obj.decode(token)
# 对称加密,比如 用于存储手机号这类信息,仍需要解密成原文的.
aes_key = "62hQWMlw0uLRC2Iw/ojbtw=="
phone = "13198765432"
aes_ecb_obj = AESECBManager(aes_key)
phone_enc = aes_ecb_obj.encrypt(phone)
phone_dec = aes_ecb_obj.decrypt(phone_enc)
Oauth模块
from rgt.oauth import DingTalkAuth, DingTalkAsyncAuth, FeiShuAuth, FeiShuAsyncAuth
from asyncio import run
# 钉钉同步Oauth认证,
client_id="dingxx......"
client_secret="............."
d = DingTalkAuth(client_id,client_secret)
d.generate_auth_url("http://127.0.0.1:8080")
d.get_user_info("auth_code")
# 钉钉异步Oauth认证
client_id="dingxx......"
client_secret="............."
d = DingTalkAsyncAuth(ding_client_idak,client_secret)
d.generate_auth_url("http://127.0.0.1:8080")
run(d.get_user_info("auth_code"))
# 飞书同步Oauth认证
app_id="cli_xxxx......"
app_secret="............."
d = FeiShuAuth(app_id,app_secret)
d.generate_auth_url("http://127.0.0.1:8080")
d.get_user_info("auth_code")
# 飞书异步Oauth认证
app_id="cli_xxxx......"
app_secret="............."
d = FeiShuAsyncAuth(app_id,app_secret)
d.generate_auth_url("http://127.0.0.1:8080")
run(d.get_user_info("auth_code"))
Metadata
Release files for really-good-things 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| really_good_things-0.2.8.tar.gz | 8.8 kB | Without provenance | Details for really_good_things-0.2.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| really_good_things-0.2.8-py3-none-any.whl | Python 3 | none | any | Details for really_good_things-0.2.8-py3-none-any.whl |
Total release size: 20.4 kB
Release files / really_good_things-0.2.8.tar.gz
| Download URL | really_good_things-0.2.8.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d32117b11c8ac451be638e0b2c33ae790a4996d6d2ac699514599b550d9daf68
|
|
BLAKE2b-256 checksum How to use checksums |
7e111a22640a7ae28864df0d2ba0d31e8783e756a65362a3506cb138c41b647e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / really_good_things-0.2.8-py3-none-any.whl
| Download URL | really_good_things-0.2.8-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed44276536b3061a51f980ad36f1d21e8363ca8940a5a5354a2a8bf4e43427c2
|
|
BLAKE2b-256 checksum How to use checksums |
dec3c409bcfe734488c0073bebad6f447f7149679a2a5753b76e5c8331c56d03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for really-good-things 0.2.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.