duyi-utils
一个用于学习 Python 公共库构建和发布的示例工程。
功能
- 日期工具 — 日期格式化、日期差值计算(依赖
python-dateutil) - Markdown 工具 — Markdown 转 HTML、去除 Markdown 标记(依赖
Markdown) - 问候工具 — 简单的个性化问候
安装
pip install duyi-utils
使用
from duyi_utils import format_date, days_until, to_html, strip_markdown
from datetime import date
# 日期工具
format_date(date(2026, 6, 1)) # => "2026年06月01日"
days_until("2026-10-01") # => 剩余天数
# Markdown 工具
to_html("**Hello**") # => "<p><strong>Hello</strong></p>"
strip_markdown("**Hello**") # => "<strong>Hello</strong>"
# 问候工具
from duyi_utils.greeter import greet
greet("小明") # => "你好, 小明!"
Release files for kevizang-utils 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kevizang_utils-0.1.3.tar.gz | 2.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kevizang_utils-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.8 kB
Release files / kevizang_utils-0.1.3.tar.gz
| Download URL | kevizang_utils-0.1.3.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b87247f7bc5c8046b34c98c0fcee1de7e978971d0ccff95864c7b9f3983ab35
|
|
BLAKE2b-256 checksum How to use checksums |
43965f7180a9d11b91771784c3358886226aea64a7334822c30a5e6a2712d19c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / kevizang_utils-0.1.3-py3-none-any.whl
| Download URL | kevizang_utils-0.1.3-py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a7ac43fc8aed9888c2df5392094497f5f176ec17c3b35cab169bf5222e8fea7
|
|
BLAKE2b-256 checksum How to use checksums |
6e34c759ef3a48dac5a5484f7689dd5dba39a9793fa37f5ee83861db4f77c535
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|