Using Cookiecutter to Initialize Python Project
Steps
- Go to the directory where you want to create the project
- Create python3 virtual env
python3 -m venv .env
- Activate the virtual environment
source .env/bin/activate
pip install cookiecutter
- Use py-package template to initialise your project
cookiecutter https://github.com/audreyr/cookiecutter-pypackage.git
- Answer a few question as they prompt. You can skip some and do it later as well.
full_name
email
github_username
project_name
project_slug: default(project_name)
project_short_description
pypi_username
version: default(0.1.0)
use_pytest: (y/n)
use_pypi_deployment_with_travis: (y/n)
add_pyup_badge: (y/n)
Select command_line_interface
create_author_file
Select open_source_license
cd project_name
python setup.py install
project_name
- Explore the file and make changes