PyCon 2019 Tutorial: Writing Command Line Applications that Click
- Python 3.5+ installed. Python Installation Guide
virtualenv&pip(Should be installed if you follow the guide above)- Git. Git installation instructions
- Optional:
pipenvorvirtualenvwrapper
This repo is a Python package. You will create a virtualenv and install the package which will install its dependencies and make new commands available.
- Open a terminal / command prompt.
- Recommended on Windows: PowerShell or WSL.
- Clone this repo:
git clone https://github.com/tylerdave/PyCon2019-Click-Tutorial.git- If you'd like to save a remote copy of your changes, create a new empty repo at your source code hosting service of choice and add it as a git remote:
git remote add personal $NEW_REPO_URL
- If you'd like to save a remote copy of your changes, create a new empty repo at your source code hosting service of choice and add it as a git remote:
cdto the root of the cloned repo:cd PyCon2019-Click-Tutorial- Create and activate a virtualenv using your favorite method and then install the package:
- Recommended: using
pipenv(installation instructions):pipenv --python python3pipenv install- On Mac/Linux:
pipenv shell
- On Windows:
pipenv shellmight give you a reduced feature shell. You should run commands withpipenv run $COMMANDinstead like:pipenv run pycon verifyinstead of justpycon verifyin the step below.
- If using
virtualenvwrapper:mkvirtualenv --python python3 click-tutorialworkon click-tutorialpip install -e .
- Manually:
python3 -m venv env- On Mac/Linux:
source env/bin/activate - On Windows:
.\env\Scripts\activate pip install -e .
- Recommended: using
- Verify installation. One of the commands that's created by this package is
pycon. You can use it to verify your setup was successful:pycon verify - Initialize tutorial. In the root of the repo, run
tutorial init.