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_joker-0.1.3.tar.gz (2.0 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_joker-0.1.3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for duyi_utils_joker-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4e89f7e069fe2c299cd3e0ae73d4bd984616224f0144988f0177970eecb55f68
MD5 85d1dd4302441fb51cd64521216cff56
BLAKE2b-256 7616e2de7be2fc2edbce0a5ddf1458af473d75d5fac96b1135758423a69230c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for duyi_utils_joker-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 58835ebd69174c4a6f3dc71a5431f67f0fe0fe64727fcbf66cfa675911e7ad5f
MD5 494c3d48ed0721c737b29ac9c51bf8c7
BLAKE2b-256 44e3d694198aa71e374e12de391e21bf24797d7980d644b8067b21729bf0b390

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