Skip to main content

A fun command line tool that makes a snake say things

Project description

pypi项目推送演示

本地打包:

python -m pip install -e .

验证是否打包成功:

# 查看是否有包
pip list 
# 执行命令查看
python -m snakesay "Hello World"
# 或均可以看到输出
ssay "Hello World"

我们通常pip install下载的包,需要到site-packages去修改代码才能生效,-e 的意思是可以编辑的含义,将本地代码和site-packages建立映射,这样修改本地源码就能生效。

推送到远端

安装必要的打包工具:

python -m pip install --upgrade pip
python -m pip install build twine

构建分发包

python -m build

上传到 PyPI:

python -m twine upload dist/*

上传时会要求输入你的 PyPI 用户名和密码 如果想先测试,可以上传到测试版 PyPI:

python -m twine upload --repository testpypi dist/*

验证安装:

pip install snakesay

或从测试版 PyPI 安装:

pip install --index-url https://test.pypi.org/simple/ snakesay

注意事项:

  1. 请确保更新 pyproject.toml 中的个人信息(作者名称和邮箱)
  2. 确保包名 "snakesay" 在 PyPI 上是可用的(没有被其他人使用)
  3. 每次上传新版本时,需要在 pyproject.toml 中更新版本号
  4. 建议先上传到 test.pypi.org 测试无误后再上传到正式的 PyPI

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

mxqq_snakesay-1.0.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mxqq_snakesay-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file mxqq_snakesay-1.0.0.tar.gz.

File metadata

  • Download URL: mxqq_snakesay-1.0.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for mxqq_snakesay-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4f238f7e1716d43a94c9e20d132429478c2035fe22ab0181b5ac0824ad67315c
MD5 9324dfe49b8128082485a4b86c8af8f3
BLAKE2b-256 2f9e5d177de8e084a994f0af2d72c2c41b8d732a52edfe3f69e2d2b802cc1a05

See more details on using hashes here.

File details

Details for the file mxqq_snakesay-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mxqq_snakesay-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for mxqq_snakesay-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40b134a7b418ec97714b31b54981c3e58fd641f35062a14ecbfa28bb49f724c1
MD5 17748a43cabe048f06864674846c4cc8
BLAKE2b-256 77daef417baa86766774c9eaffca727571ec46e223ebba2a05abcf80ffab0f40

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