Skip to main content

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

Project description

duyi-utils

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

功能

  • 日期工具 — 日期格式化、日期差值计算(依赖 python-dateutil
  • Markdown 工具 — Markdown 转 HTML、去除 Markdown 标记(依赖 Markdown
  • 问候工具 — 简单的个性化问候

安装

pip install my-utils

使用

from my_utils6608 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 my_utils6608.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

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

my_utils6608-0.1.3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: my_utils6608-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.1

File hashes

Hashes for my_utils6608-0.1.3.tar.gz
Algorithm Hash digest
SHA256 76db7eecbb7686ed6e6d9472bca6219d61532059709274c35cde237fecf8acd3
MD5 e5df81eb09f25252a3d91491be42e74d
BLAKE2b-256 abb4ca3a42374c10eb465aaa1f2f1a46369a0c957e880731052a72ab89db7f1c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for my_utils6608-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 63d39ac014bb8dbdb456053a21383d6baabe92d8bf10c076770da1378e3c8487
MD5 fa593454a533a04fe2271f9bcd4b1269
BLAKE2b-256 d5ec39415988e7779dee1e2937b75da51309b734eced59a06e93564ba90001e0

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