echotools
通用基础设施 SDK:配置中心、日志、事件总线、调用链、任务调度、 插件框架、协议系统、自适应选择器,完全项目无关,兼容 Python 3.8–3.14。
安装
# 核心(仅 typing-extensions)
pip install echotools
# 完整功能
pip install echotools[all]
可选依赖
| Extra | 用途 |
|---|---|
toml |
TOML 配置读写 |
watch |
watchdog 文件监视 |
http |
aiohttp Web 层 |
socks |
SOCKS 代理 |
ssh |
SSH 终端 |
terminal |
Windows ConPTY |
all |
全部可选依赖 |
dev |
pytest, ruff, mypy |
快速开始
from echotools import EchoTools
et = EchoTools(service_name="myapp")
et.logger.configure(level="INFO", color=True)
cfg = et.config
cfg.load("config.toml")
with et.tracer.trace("request") as trace:
with et.tracer.span(trace, "db") as span:
span.set_tag("query", "select 1")
await et.shutdown()
能力总览
| 模块 | 说明 |
|---|---|
ConfigCenter |
点路径配置 + 热重载 + 类型绑定 |
LoggerManager |
调用链注入 + 颜色 + 轮转 |
EventBus |
同步/异步事件 |
Tracer |
轻量调用链 |
TaskDispatcher |
单发/竞速 + 贝叶斯自适应选择 |
PluginRegistry |
自动发现 + 热重载 |
get_protocol |
XML/antml/original/bracket/nous 等 LLM 工具协议 |
ProxyManager |
HTTP/HTTPS/SOCKS |
AutoUpdater |
git 自动更新 |
FileWatcher |
轮询文件监视 |
开发
pip install -e ".[dev,all]"
make lint
make test
make cov
模块指南见 docs/modules.md,API 参考见 docs/api.md。
许可证
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
echotools-2.3.31.tar.gz
(552.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
echotools-2.3.31-py3-none-any.whl
(621.8 kB
view details)
File details
Details for the file echotools-2.3.31.tar.gz.
File metadata
- Download URL: echotools-2.3.31.tar.gz
- Upload date:
- Size: 552.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5aeef32021087f8ec83b6f347c4c2820cfaf777fff9f2f92ee8f7f17bbe3b15
|
|
| MD5 |
16512f52a395d042aa5ca9e6095c4c16
|
|
| BLAKE2b-256 |
73aa1d7c53118b6f6a64efef9fa5f7acbb1625e9d0e3eefb760cca5b4af8929b
|
File details
Details for the file echotools-2.3.31-py3-none-any.whl.
File metadata
- Download URL: echotools-2.3.31-py3-none-any.whl
- Upload date:
- Size: 621.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf9290ae80400d1c379b44f3d0ab091297a9ef34daca38b484176ad0f46eae68
|
|
| MD5 |
c0217a9fc638dd7d8d5b752d5a9f536e
|
|
| BLAKE2b-256 |
cfbdaec0030a5465c0e78e7a916f5700de8f2e81cdfd44c51968358b0c9882cf
|