A Python boilerplate starter project template to setup a baseline Python project for you to get started.
Click the Use this template button at the top of this project's GitHub page to get started.
- Python v3.12.xhttps://www.python.org/ or higher needs to be installed.
- Poetry v1.5.1 or higher needs to be installed
- Taskfile to run the build chain commands listed below.
The toolchain is driven by using Taskfile and all commands are managed via the file Taskfile.yml
The list of commands is as follows:
* activate: Activates the virtual environment.
* clean: Cleans the environment, Overwrites the pyproject.toml file
* create: Inits the poetry virtual environment and installs baseline packages.
* default: Call Create as default cmd.
* deps: Install the dependencies.
* docker-build: builds a docker image based on the docker file
* docker-run: builds a docker image based on the docker file
* install: installs the poetry environment with dependencies.
* lint: Lints the project using ruff --fix
* release: uses pyinstaller to package your Python application into a single package
* run: Run the script main.py
* test: Tests the project.
* update: updates dependency versions
* vulncheck: Checks for vulnerabilities in the project
Execute using the taskfile utility:
task <command_from_above_list>
To get started type:
task create deps activate
- this will create a new environment, fetch the dependencies and activate the virtual environment in one step.task run
- to run main.py in the root.task clean
- to delete everything in the virtual environment folder.
- Advanced poetry setup: https://testdriven.io/blog/python-project-workflow/
- original concept derived from here: https://github.com/Justintime50/python-template