
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
一个现代化的Python多功能工具库,为企业应用提供一系列高质量、零依赖的解决方案。专注于性能、易用性和可扩展性。
staran
旨在成为一个可扩展的工具库,包含多个独立的、高质量的模块。每个模块都专注于解决特定领域的问题,并遵循统一的设计标准。
date
: 企业级日期处理工具 (v1.0.9) - 智能推断与异步处理版file
: 文件处理工具crypto
: 加解密工具network
: 网络通信工具staran/
├── __init__.py # 主包入口
├── README.md # 项目简介
├── API_REFERENCE.md # 完整API文档
├── CHANGELOG.md # 版本更新日志
└── date/ # 日期工具模块
├── __init__.py # date模块入口
├── core.py # 核心Date类 (2000+行代码)
├── i18n.py # 国际化支持
├── lunar.py # 农历功能
├── examples/ # 使用示例
│ ├── basic_usage.py
│ ├── enhanced_features.py
│ └── v109_features_demo.py
└── tests/ # 测试套件
├── test_core.py
├── test_v108_features.py
├── test_v109_features.py
└── run_tests.py
# 从PyPI安装 (推荐)
pip install staran
# 从源码安装
git clone https://github.com/StarLxa/staran.git
cd staran
pip install -e .
from staran.date import Date
# 创建日期对象
d = Date(2025, 7, 29)
print(d.format_chinese()) # 2025年7月29日
# v1.0.9 新功能 - 智能推断
smart_date = Date.smart_parse("15") # 自动推断为本月15日
print(smart_date.format_iso())
# 异步批量处理
import asyncio
async def demo():
dates = await Date.async_batch_create(['2025-01-01', '2025-12-31'])
return [d.format_chinese() for d in dates]
result = asyncio.run(demo())
print(result) # ['2025年1月1日', '2025年12月31日']
操作类型 | v1.0.9性能 | 提升幅度 |
---|---|---|
对象创建 | 10,000个/28ms | 24% ↑ |
农历转换 | 100个/5.5ms | 31% ↑ |
批量处理 | 1,000个/1.2ms | 40% ↑ |
格式化操作 | 15,000次/3ms | 25% ↑ |
内存占用 | 54 bytes/对象 | 15% ↓ |
# 运行所有测试
cd staran
python -m staran.date.tests.run_tests
# 测试统计: 188项测试,100%通过率
# - 核心功能: 126项测试
# - v1.0.8功能: 21项测试
# - v1.0.9新功能: 21项测试
# - 增强功能: 20项测试
# 克隆项目
git clone https://github.com/StarLxa/staran.git
cd staran
# 安装开发依赖
pip install -e .
# 运行测试
python -m staran.date.tests.run_tests
本项目采用 MIT 许可证。详细信息请查看 LICENSE 文件。
Staran v1.0.9 - 让日期处理更简单、更强大! 🚀
专为企业级应用设计,追求极致的性能与易用性。
FAQs
staran - 企业级Python日期处理库
We found that staran demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.