我挑的 Python

開發環境

Agenda

* python environment

* create your project

* upload your package

* make your docs

Python Environment

(我選用 pyenv)

(你也可以選其他, 例如 virtualenv)

pyenv

➜  pyenv versions
  system
  3.7.3
* 3.8-dev (set by /Users/ming/src/pytnon/ming-p1/.python-version)
  3.9-dev

➜  pyenv local 3.9-dev

➜  pyenv global 3.8-dev

➜  pyenv version
3.8-dev (set by /Users/ming/src/pytnon/ming-p1/.python-version)

Create Your Project

use "poetry new poetry-demo"

Upload Your Package

use "twine upload -r testpypi dist/*"

use "twine upload dist/*"

 

use "poetry publish"

先 Publish 到 TestPyPI

(確定沒問題, 在部署到 PyPI)

 

TestPyPI

➜ poetry build

poetry config repositories.testpypi https://test.pypi.org/legacy/

➜ poetry publish -r testpypi

 

 

➜ poetry build

poetry config repositories.pypi https://test.pypi.org/legacy/

➜ poetry publish

PyPI

Make Your Docs

(with docstring)

(先在程式裡 加好 docstrings)

 

sphinx-apidoc -f -o docs/source .

➜ poetry run invoke html

➜ poetry run invoke serve

我挑的 Python 開發環境

By Ming-der Wang

我挑的 Python 開發環境

  • 829