Skip to main content

一个用于学习 Python 公共库构建和发布的示例工程

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

duyi_utils-0.1.3.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duyi_utils-0.1.3-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file duyi_utils-0.1.3.tar.gz.

File metadata

  • Download URL: duyi_utils-0.1.3.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for duyi_utils-0.1.3.tar.gz
Algorithm Hash digest
SHA256 280a88c4e2962d58a7c04c4ae304fa275eb4989bd95c2eef2b76e752659d146e
MD5 88cd1b6eecb815c03b2c5ad9aa11902e
BLAKE2b-256 bcd4261696d21c2c2d4b68c6fe3d073253efdd846f6b90dad0041797b406e385

See more details on using hashes here.

File details

Details for the file duyi_utils-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: duyi_utils-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for duyi_utils-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8813b206618f63a129d5915323c24f3a54965d192c3715e1a9f936e72ad2f37
MD5 5ada14fb15fa187e978744f95dcdb595
BLAKE2b-256 ab7741a2a5b161e9f3c50dbc3f0b8beae888cc22f6585408179da35b6a93a37e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page