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 ddd-utils-zcheng 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ddd-utils-zcheng 0.0.1
File Size Uploaded Provenance Actions
ddd_utils_zcheng-0.0.1.tar.gz 2.1 kB Without provenance Details for ddd_utils_zcheng-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ddd-utils-zcheng 0.0.1
File Interpreter ABI Platform Actions
ddd_utils_zcheng-0.0.1-py3-none-any.whl Python 3 none any Details for ddd_utils_zcheng-0.0.1-py3-none-any.whl

Total release size: 4.7 kB

Release files / ddd_utils_zcheng-0.0.1.tar.gz

Download URL ddd_utils_zcheng-0.0.1.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1feca671fcacc2ed59b5c193797acc71da66b061e2d8826ab4c4c7f066ea53cd
BLAKE2b-256 checksum
How to use checksums
17b293fb8f5c7a02860de4b50e7d5e4b6cc7e4924d97dea31156e08ed429a19e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / ddd_utils_zcheng-0.0.1-py3-none-any.whl

Download URL ddd_utils_zcheng-0.0.1-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cb8299f4495220e93979c7c0bfae2f112281ac89d7d1ae7c8b9b78b783ad35b
BLAKE2b-256 checksum
How to use checksums
efe0f4b020bd48e4e17876e3c613f0fd0550349788c92180072f574fb48ed98c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for ddd-utils-zcheng 0.0.1

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.0.1 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