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.4.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.4-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: my_utils6608-0.1.4.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for my_utils6608-0.1.4.tar.gz
Algorithm Hash digest
SHA256 cc5903e678b983c6662f3b4294c00f837cc69eea1f38959e9a6363a271eeeba1
MD5 d4a2ccbd275b01455ac1c88339a27dd7
BLAKE2b-256 a25a44b741e8314881e87c0adede5ba30ab4c5baf82e7746923e692aa3e0beba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: my_utils6608-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for my_utils6608-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f5771eac6400430d18e232d9056544210b129a002ef9dc514eff4bce1dde6b46
MD5 2c08ddfd388cbc66914ab9611a59cfa3
BLAKE2b-256 3f57b9f7ac8a48d481e0aba05ec4e229d2b92961bd606eb99fb6ec1360accd65

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