Metadata-Version: 2.5
Name: blankcx330-hello
Version: 0.1.4
Summary: 一个用于学习 Python 公共库构建与发布的示例工程
Author: blankcx330
License-Expression: MIT
Keywords: demo,hatchling,packaging,pypi,tutorial
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.14
Requires-Dist: markdown>=3.5
Requires-Dist: python-dateutil>=2.8
Description-Content-Type: text/markdown

# blankcx330-hello

一个用于学习 **Python 公共库构建与发布** 全流程的示例工程：从源码组织、
`pyproject.toml` 配置，到 `python -m build` 打包、`twine` 上传 PyPI，
再到 `pip install` 安装使用。

## 简介

`blankcx330-hello` 演示一个最小可发布的 Python 包应该长什么样：

- 采用 `src` 布局，源码与工程配置分离，避免脚本和缓存被误打进发行包；
- 使用 [hatchling](https://hatch.pypa.io/) 作为构建后端，全部配置集中在 `pyproject.toml`；
- 同时产出 sdist（`.tar.gz`）与 wheel（`.whl`）两种分发格式。

包本身只做一件事：打印一句问候语。价值不在功能，而在于把这套流程完整跑通一遍。

## 环境要求

- Python >= 3.14

## 安装

```bash
pip install blankcx330-hello
```

> 发行名 `blankcx330-hello` 和导入名 `blankcx330_hello` 不一样：PyPI 上带连字符，
> `import` 时连字符会变成下划线，这是 Python 模块名的正常约定。

从源码以开发模式安装：

```bash
git clone <你的仓库地址>
cd blankcx330-hello

python -m venv .venv
. .venv/Scripts/Activate.ps1    # Windows PowerShell
# source .venv/bin/activate     # macOS / Linux

pip install -e .
```

## 快速开始

```python
from blankcx330_hello import hello

hello()
```

输出：

```text
你好，这是一个包里面的函数
```

## API

### `blankcx330_hello.hello()`

打印一句固定的问候语，不接受参数，返回 `None`。

| 名称    | 签名         | 说明                 |
| ------- | ------------ | -------------------- |
| `hello` | `() -> None` | 在标准输出打印问候语 |

## 项目结构

```text
blankcx330-hello/
├── pyproject.toml          # 构建系统与项目元数据
├── README.md
└── src/
    ├── main.py             # 本地演示脚本，不随包发布
    └── blankcx330_hello/
        ├── __init__.py     # 对外导出 hello
        └── hello.py        # 具体实现
```

## 构建与发布

```bash
python -m build                     # 产物生成到 dist/
python -m twine check dist/*        # 校验元数据与 README 渲染
python -m twine upload dist/*       # 需要 PyPI API Token
```

## 许可证

MIT
