Metadata-Version: 2.4
Name: sshared
Version: 0.21.0
Summary: 后端共享组件
Author-email: FHU-yezi <yehaowei20060411@qq.com>
License: MIT License
        
        Copyright (c) 2025 FHU-yezi
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: msgspec>=0.19.0
Provides-Extra: api
Requires-Dist: litestar>=2.14.0; extra == 'api'
Provides-Extra: config
Requires-Dist: tomli>=2.0.0; extra == 'config'
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.2.0; extra == 'postgres'
Provides-Extra: retry
Requires-Dist: typing-extensions>=4.12.0; extra == 'retry'
Description-Content-Type: text/markdown

# sshared

后端共享库。

## 功能介绍

- `api`：基于 Litestar 框架的标准化 Web API 实现
- `config`：TOML 配置文件解析模块，包含常用的配置块
- `logging`：支持彩色输出、异常记录、保存到 PostgreSQL 数据库的日志记录模块
- `postgres`：PostgreSQL 表、视图、物化视图封装，连接池模块
- `terminal`：支持彩色输出、异常类格式化输出的终端增强模块
- `retry`：支持同步和异步函数、内置指数退避算法、支持重试 Hook
- `strict_struct`：基于 msgspec 的严格数据校验模块
- `time`：基于标准库 `date` / `datetime` 的日期处理模块
- `word_split`：基于阿里云 NLP 分词接口的分词模块