Skip to main content

hello3 库

一个简单的 Python 库,打印 "Hello, World!"。

安装

使用 pip 安装库

pip install hello3

使用

from hello3 import say_hello

say_hello("World")  # Output: Hello, World!

构建和发布到 PyPI

安装必要的工具: 安装 setuptoolswheeltwine,它们是用来打包和上传库的工具。

pip install setuptools twine wheel

2.构建包

在项目根目录下运行以下命令来生成分发包

python3.10 setup.py sdist bdist_wheel

3.上传到 PyPI

确保你已经拥有 PyPI 的发布权限。然后,使用以下命令将包上传到 PyPI:

python3.10 -m twine upload dist/*

Release files for hello3 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hello3 0.1.0
File Size Uploaded
hello3-0.1.0.tar.gz 2.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hello3 0.1.0
File Interpreter ABI Platform
hello3-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.1 kB

Release files / hello3-0.1.0.tar.gz

Download URL hello3-0.1.0.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fe296b6ff1aacf38c75d9c8756333b17cae703944711256d6777953350b0474c
BLAKE2b-256 checksum
How to use checksums
957cbd673f4cd6b0bb70b244157380a0bcb659302611f93c04f7b4ad495cadac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / hello3-0.1.0-py3-none-any.whl

Download URL hello3-0.1.0-py3-none-any.whl
Size 2.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4086e45a71b8da672a2c54d02969b5cf67518a2ed1d430e102f489a01f203dad
BLAKE2b-256 checksum
How to use checksums
a2594a35e4751e8f8c9b47084750fea7a1d3bd28a1ee393347d39a4e2fc225e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page