Skip to main content

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("小明")                     # => "你好, 小明!"

Metadata

Release files for duyi-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)

Source distribution for duyi-utils 0.1.3
File Size Uploaded Provenance Actions
duyi_utils-0.1.3.tar.gz 2.1 kB Without provenance Details for duyi_utils-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for duyi-utils 0.1.3
File Interpreter ABI Platform Actions
duyi_utils-0.1.3-py3-none-any.whl Python 3 none any Details for duyi_utils-0.1.3-py3-none-any.whl

Total release size: 4.6 kB

Release files / duyi_utils-0.1.3.tar.gz

Download URL duyi_utils-0.1.3.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
280a88c4e2962d58a7c04c4ae304fa275eb4989bd95c2eef2b76e752659d146e
BLAKE2b-256 checksum
How to use checksums
bcd4261696d21c2c2d4b68c6fe3d073253efdd846f6b90dad0041797b406e385
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / duyi_utils-0.1.3-py3-none-any.whl

Download URL duyi_utils-0.1.3-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8813b206618f63a129d5915323c24f3a54965d192c3715e1a9f936e72ad2f37
BLAKE2b-256 checksum
How to use checksums
ab7741a2a5b161e9f3c50dbc3f0b8beae888cc22f6585408179da35b6a93a37e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for duyi-utils 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page