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-zyc 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-zyc 0.1.3
File Size Uploaded Provenance Actions
duyi_utils_zyc-0.1.3.tar.gz 2.0 kB Without provenance Details for duyi_utils_zyc-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 4.6 kB

Release files / duyi_utils_zyc-0.1.3.tar.gz

Download URL duyi_utils_zyc-0.1.3.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ce01aa8d63c8cfc47a9a14375e7b5ca7b54c380645cee9eea4560e4a2dbf7246
BLAKE2b-256 checksum
How to use checksums
a30f9670b0a6abb9d6dc49840924f8b1160159b3068acfab26f01b38416215c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.1

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

Download URL duyi_utils_zyc-0.1.3-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1328acb4c6d37e61c898e1a5d099ef029e11dab47335abeb210c6db75875089f
BLAKE2b-256 checksum
How to use checksums
03a1773dcbcb7b2d300879c39c8e63bb6e48c503d57c23c91a616196ff619f8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.1

Security for duyi-utils-zyc 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