Today I have prepared the workflow for my Python projects.
Win+R
in the run boxwt.exe
to run terminalUse cd command to navigate to the directory where you want your project directory to be placed
type
mkdir your_project_name
to create project foldertype
python -m venv .venv
to create virtual environment using “venv” module ortype
conda create -n your_project_name python=3.x
to create a new environment using "conda" your_project_name.type
.venv\\Scripts\\activate
on Windows or source.env/bin/activate
on macOS/Linux. orconda activate your_project_name
type
type nul> your_project_
name.py
to create a new file for writing scripttype
git init
to initialize a Git repository within your project directory.type
git add
main.py
orgit add *
type
git commit -m "Initial commit"
to commit the staged changes to the Git repository with a descriptive message.Open the VS Code terminal or navigate back to the project directory in your terminal
type in vs code terminal
pip install -r requirements.txt
to install any required packages listed in a requirements.txt file within your project.type
git push origin main
to push your local changes to the remote repositorytype
git pull origin main
to pull any changes from the remote repositoryafter finishing work in your project, install pyinstaller
pip install pyinstalller
type
pip freeze > requirements.txt
to create requirements filetype
pyinstaller your_
script.py
to convert your script as exe if you wanttype
deactivate
to deactivate the virtual environment.