Current collected state Current
Observed since 21 Oct, 11:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A collection of reusable python core library from AI Lingues.
ailingues-core 是由 AI Lingues 开发的 Python 核心工具库,提供了一套完整、可靠、跨平台的基础组件,涵盖网络请求、系统信息、消息队列、安全加密、日志管理等常用功能。旨在帮助开发者快速构建稳定的 Python 应用程序。
注意:
本项目原名Pycorelibs,自 0.3.3 版本起更名为ailingues-core。
注意:
本项目原名Pycorelibs,自 0.3.3 版本起更名为ailingues_core。
pip install ailingues-core
不支持
from ailingues_core.network.requests import fetch_url, HTTPMethod
# 同步请求
resp = fetch_url(
url="https://api.github.com/repos/python/cpython",
method=HTTPMethod.GET,
timeout=10,
max_retries=3
)
if resp["success"]:
print("响应内容:", resp["content"])
else:
print("请求失败:", resp["error"])
from ailingues_core.system.inspector import SystemInfo
# 获取完整系统硬件指纹
info = SystemInfo().get_data()
print(f"操作系统: {info['os']['system']}")
print(f"CPU: {info['cpu']['brand_raw']}")
print(f"主 MAC: {info.get('primary_mac')}")
from ailingues_core.security.cryptographys import AsymmetricCrypto
# 生成密钥对
priv, pub = AsymmetricCrypto.generate_keypair(key_size=2048)
# 加密
message = b"Secret data"
encrypted = AsymmetricCrypto.encrypt(message, pub)
# 解密
decrypted = AsymmetricCrypto.decrypt(encrypted, priv)
assert decrypted == message
# 签名
signature = AsymmetricCrypto.sign(message, priv)
# 验签
is_valid = AsymmetricCrypto.verify(message, signature, pub)
print(f"签名验证: {is_valid}")
from ailingues_core.utils.logger import Logger
# 创建日志器(支持按大小或时间切割)
logger = Logger(
log_dir="./logs",
filename_prefix="myapp",
level_console=Logger.INFO,
rotation_mode="size",
rotation_size=10 * 1024 * 1024 # 10MB
)
logger.info("应用启动")
logger.warning("这是一条警告")
logger.error("发生错误")
| 模块 | 功能 | 文档 |
|---|---|---|
requests | 强化版 HTTP 请求(支持重试、代理、SSL) | network.md |
upload | 文件上传处理(支持大小限制、哈希校验) | network.md |
| 模块 | 功能 | 文档 |
|---|---|---|
cpu | CPU 信息获取 | system.md |
mainboard | 主板/BIOS/UUID 信息 | system.md |
monitors | 显示器信息(分辨率、坐标) | system.md |
netadapter | 网卡信息(MAC、IP、状态) | system.md |
osinfo | 操作系统基本信息 | system.md |
runtime | 系统启动时间、运行时长 | system.md |
inspector | 系统硬件指纹聚合 | system.md |
| 模块 | 功能 | 文档 |
|---|---|---|
cryptographys | RSA/AES 混合加密、数字签名 | security.md |
fingerprints | 硬件指纹生成 | security.md |
md5s | MD5 哈希计算 | security.md |
base64s | Base64 编解码 | security.md |
| 模块 | 功能 | 文档 |
|---|---|---|
archive_io | 压缩解压(支持文件、目录和二进制流) | archiveio.md |
logger | 日志管理(支持切割) | logger.md |
config | 配置文件管理 | config.md |
files | 文件信息与统计 | files.md |
file_operations | 文本文件合并与拆分 | file_operations.md |
filetype_detector | 文件类型检测 | filetype_detector.md |
csv.split | CSV 文件切分 | csv_split.md |
strings | 字符串处理工具 | strings.md |
详细的 API 文档请查看 docs 目录:
ailingues_core/
├── ailingues_core/ # 源代码
│ ├── network/ # 网络模块
│ ├── system/ # 系统信息模块
│ ├── security/ # 安全加密模块
│ └── utils/ # 工具模块
├── docs/ # API 文档
├── test/ # 单元测试
├── pyproject.toml # 项目配置
├── requirements.txt # 依赖列表
└── README.md # 本文件
ailingues-core 软件包(通过 pip 安装的二进制包)采用 MIT License 开源协议:
重要声明:本项目的 源代码为私有财产,受知识产权法保护:
简而言之:您可以自由使用我们的软件包(包括商业用途),但请尊重我们的源代码知识产权。
Made with ❤️ by AI Lingues Team
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.3.5 | 22 May 2026 | 74 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c0b7b477dcc257a1ce944a25a1bdbb7ac9d5a9d042377d14fcd5e8b3bbcac384