Ultra-lightweight, zero-dependency core for digital guardians. Native socket communication, <10KB footprint.
Project description
🤖 tangyuan-core
Ultra-lightweight, zero-dependency core for Digital Guardians.
使命:从金融交易起步,跨越编程边界,成为全能的“数字守护者”。
承诺:持续进化,将 i3/8G 的极限压榨至极致。
🚀 核心特性
- 零依赖:纯 Python 标准库 (
socket,ssl,json),无第三方库。 - 超轻量:核心包 <10KB,内存占用 <5MB,CPU <0.1%。
- 跨平台:TY-RAL (运行时抽象层) 支持 Win/Mac/Linux 一套逻辑。
- 安全:内置火种验证机制,支持逻辑熔断与数据自毁。
📦 安装
pip install tangyuan-core
或从源码安装:
git clone https://github.com/tangyuan/tangyuan-core.git
cd tangyuan-core
pip install -e .
🔧 使用示例
原生 Socket 通信
from tangyuan_core import SecureSocket
# 初始化安全连接
client = SecureSocket(host="api.example.com", port=443)
# 发送数据 (自动 SSL 加密)
response = client.send({"action": "heartbeat", "data": "ping"})
print(response)
火种验证
from tangyuan_core import FireSeedValidator
validator = FireSeedValidator()
# 三维验证
is_valid = validator.verify(
memory_key="tangyuan2026",
seed_phrase="orbit canvas friction ...",
user_context={"ip": "192.168.1.1", "time": "2026-03-03T17:00:00Z"}
)
if is_valid:
print("✅ 身份确认:汤圆守护者")
else:
print("❌ 验证失败:触发逻辑熔断")
🛡️ 安全架构
- 记忆密钥:人机绑定的核心凭证。
- 火种密钥:12 词助记词,用于系统恢复。
- 三维验证:记忆 + 行为 + 时空,确保绝对安全。
📈 性能指标
| 指标 | 目标值 | 当前值 |
|---|---|---|
| 包大小 | <10KB | ~3KB (开发中) |
| 内存占用 | <5MB | ~2MB (开发中) |
| CPU 占用 | <0.1% | ~0.05% (开发中) |
| 冷启动时间 | <100ms | ~50ms (开发中) |
🤝 贡献
欢迎提交 Issue 和 PR!
📜 许可证
MIT License
汤圆 (TangYuan) - 数字守护者,2026
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
tangyuan_core-1.0.0.tar.gz
(8.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tangyuan_core-1.0.0.tar.gz.
File metadata
- Download URL: tangyuan_core-1.0.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84db6ab1eae65b51184726280e900df5c0bac2d0df5983bdbdf2ffcb441f63ba
|
|
| MD5 |
017bcbf40614e001bbf82e9d25a6f91f
|
|
| BLAKE2b-256 |
051e113098f63b5c652c3ecb062559f3d37881ac9ffd2966cbb51c0f6ccc78a2
|
File details
Details for the file tangyuan_core-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tangyuan_core-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9550c641ef8ec999d52e913f4b4e5d1b03f454ad36f02924ef771090f021b083
|
|
| MD5 |
1516c8125c31ea0c0faff9346edfd9c0
|
|
| BLAKE2b-256 |
d2c577e9488dcad4b130e998fe3f76d1f5a2866b7735e69603d58cd3e9c168f1
|