To create a Python project, follow this process:
- Create not folder in the current dir with project name based on prompt
- Create all directories, subdirectories and files defined in template folder.
- In command line execute git init in the project folder to initialize a git repository.
- create a virtual environment for the project using
python -m venv .venvand activate it. - In .gitignore file add lines to ignore .venv and pycache/ folders.
- Create github repository with the same name as project and push the code to the repository using following command: gh repo create [project-name] --description "repository on GitHub." --public
- Exeute following command to push code to github repository: git add . git commit -m "Initial commit" git branch -M master git remote add origin git@github.com:osrokas/[project-name].git git push -u origin master
- At the end print "Project [project name] created successfully.