Skip to main content

project description

Project description

Python Package Template

📦 一个快速上传到 PyPI 的 Python Package 模版。

上传到 PyPI 后可以使用 pip install 安装。

1 使用方法

  1. 点击本项目右上角的绿色按钮 Use this template(使用此模板),输入名称和说明,完成创建;

  2. 将项目克隆到本地,这里以本项目为例,实际操作时这里需要替换你自己的项目;

    git clone https://github.com/Ailln/python-package-template.git --depth 1
    
  3. 修改配置,文件中有提示;

    cd your_package_name
    
    # 1. 替换默认项目名称 package_name 为你的项目名称
    # Usage: bash scripts/set_package_name.sh os_name old_name new_name
    # os_name 支持的有 `mac` 和 `linux`
    # old_name 是 package_name
    # new_name 是你的项目名称
    bash scripts/set_package_name.sh mac package_name your_package_name
    
    # 2. 将 `README.md` 修改为你的项目介绍,也就是你当前在读的这个文本。
    
  4. 编写你的 Package 代码,并进行测试。

    # 在本地进行充分测试
    bash scripts/local_test.sh
    
  5. 上传到 PyPi(需要注册),参考如何发布自己的包到 pypi

    bash scripts/upload_pypi.sh
    
  6. 更新到 Github。

    git push
    

2 项目结构

.
├── package_name # 项目名称
│    ├── shell # 在命令行中执行的代码
│    │    ├── __init__.py
│    │    └── usage.py
│    └── src # 静态资源
│          └── temp.txt
├── scripts
│    ├── set_package_name.sh # 批量替换默认的项目名称
│    ├── local_install.sh
│    ├── local_test.sh
│    └── upload_pypi.sh
├── README.md # 项目文档
├── requirements.txt # 包依赖
├── .gitignore # 忽略文件
├── MANIFEST.in # 要包含在 sdist 命令构建的分发中的文件列表。
├── LICENSE # 这里面的内容为本项目的 License,你需要手动替换它。
└── setup.py # 安装配置

3 TODO

  • 增加 test 相关代码。

4 许可

5 参考

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

awa-0.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

awa-0.0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file awa-0.0.1.tar.gz.

File metadata

  • Download URL: awa-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for awa-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cbe9b5f77a52f617a7c1fe8b92d76d9d52fb5f9c6fde5eed3cad3fd8ca2bf9db
MD5 ff0d00cc9a2e35ef52f2c5a71d8ff10b
BLAKE2b-256 e269173e9f34727da4f2661f33f80d687b66e6454354d3646b7de4156e6a714b

See more details on using hashes here.

File details

Details for the file awa-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: awa-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for awa-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9de6031665851c0dcb5e4718b0f3d0951a15fdd7e01c97cad601a46080271436
MD5 03086ea8befda39f667900cd57a991d0
BLAKE2b-256 d3c1daa5f5714243d9d070b09f339b517354817a25eb41d9fdf6370f29536c5c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page