- OS : Windows 10
- Install Python ( miniconda ) by scoop
- Install pip packages globally
- pipenv
- mypy
- prospector
- pylama
- yapf
- Install VSCode
- Install Plugins
- Python
- MagicPython
- Initialize
$ # make project directory $ mkdir sampleproject $ cd sampleproject $ git init $ $ # create virtual env $ pipenv --three # initialize $ pipenv install flask $ pipenv install pytest==3.0.5 --dev $ $ # enter .venv environment $ pipenv shell $ python -V # show the python version in venv $ exit $ $ # create main.py $ touch main.py $ $ # create module folder $ mkdir newmodule $ touch newmodule/__init__.py $ touch newmodule/calc.py $ $ # execute $ pipenv run python main.py $ $ # create test folder $ mkdir test
$ touch test/init.py $ touch test/test_calc.py $ $ # testing $ pipenv run py.test $ $ # create setup.py if you want to publish to PyPI $ touch setup.py $ ```
- Download files from Gist and deploy
- project root /
- .vscode /
launch.json
- newmodule /
__init__.py
calc.py
- test /
__init__.py
test_calc.py
.gitignore
-main.py
- Pipfile
- pipfile.lock
- .vscode /
-
Run
$ pipenv run python main.py
-
Debug
You put launch.json and launch server