总结

开发 Python 包

James Fulton

Climate informatics researcher

从小处开始

  • NumPy——由 Travis Oliphant 发起
  • Pandas——由 Wes McKinney 发起
开发 Python 包

回顾

  • 模块 vs 子包 vs 包
  • 包结构与 __init__.py
  • 绝对与相对导入
  • 使用 pyment 编写文档
  • 使用 flake8 的代码风格
  • 用 setup.py 使包可安装
  • 用 install_requires 与 requirements.txt 管理依赖
  • 支持文件:LICENSE、README.md、CONTRIBUTING.md、HISTORY.md
  • 用 twine 构建并上传到 PyPI
  • 用 pytest 与 tox 测试
  • 用 cookiecutter 的包模板
  • 用 Makefile 高效维护包
开发 Python 包

进阶主题

开发 Python 包

做得好!

开发 Python 包

Preparing Video For Download...