python

进行各种语言的包发布

pypi-demo (0.1.3)

Published 2025-11-20 20:05:03 +08:00 by published

Installation

pip install --index-url  --extra-index-url https://pypi.org/simple pypi-demo

About this package

进行 pypi 模块发布测试

📦 pypi_demo

一个简单的 Python 示例项目,提供一句话(Hitokoto)随机语句获取接口。

适合学习:

  • Python 包结构
  • 使用 uv 构建与发布
  • 如何上传到 Gitea 私有 PyPI

功能特点

  • 获取随机一言(https://v1.hitokoto.cn/)
  • 简单易用的函数接口
  • 支持私有 PyPI 发布
  • 完整的 uv 构建/发布流程示例

📥 安装

通过 Gitea 私有 PyPI 安装:

pip install pypi_demo --index-url https://gitea.kmux.cn/api/packages/python/pypi/simple

或使用 uv:

uv add pypi_demo --index https://gitea.kmux.cn/api/packages/python/pypi/simple

🚀 使用示例

from pypi_demo import get_hitokoto

print(get_hitokoto())

输出示例:

人生如逆旅,我亦是行人。

📂 项目结构

.
├── README.md
├── pyproject.toml
└── src
    └── pypi_demo
        └── __init__.py

🔧 开发说明

构建包

uv build

构建产物位于:

dist/
    pypi_demo-*.whl
    pypi_demo-*.tar.gz

发布到 Gitea PyPI

uv publish

📜 许可协议

MIT License

Requirements

Requires Python: >=3.13
Details
PyPI
2025-11-20 20:05:03 +08:00
8
5.3 KiB
Assets (2)
Versions (4) View all
0.1.3 2025-11-20
0.1.2 2025-11-20
0.1.1 2025-11-20
0.1.0 2025-11-20