A development-focused Python project template with various integrations, configurations and modules.
Warning
Serious Scaffold Python is in the Alpha phase. Frequent changes and instability should be anticipated. Any feedback, comments, suggestions and contributions are welcome!
Setting up a project often involves more than just establishing a basic project structure. It involves tasks like integrating GitHub Actions or GitLab CI/CD, configuring lint, test and documentation, as well as implementing settings, logging and other frequently used modules. Serious Scaffold Python streamlines this process. Powered by copier
, bootstrapping a new Python project can be done with a single command. By answering a few questions, the project will be fully configured and ready for development. Furthermore, the project can be updated alongside the advancement of the template.
If you find this helpful, please consider sponsorship.
- Project setup and template update with
copier
. - Manage virtual environments for development with
pipenv
. - Manage dependency with categorized requirements and constraints.
- Automate Git hooks with pre-commit hooks and local linters.
- Lint with
black
,isort
,mypy
,ruff
, andtoml-sort
. - Test with
pytest
andcoverage
for threshold and reports. - Document with
sphinx
, thefuro
theme, and mypy/coverage reports. - Version the package using git metadata with
setuptools-scm
. - Continuous Integration with GitHub Actions and GitLab CI/CD.
- Versioned documentation with Read the Docs integration.
- Develop Command Line Interfaces with
typer
. - Manage configurations with
pydantic-settings
. - Centralize common actions with a unified Makefile.
- VSCode settings with recommended extensions.
Certain system-level Python applications are needed and it is recommended to use pipx
to install and run them in isolated environments. Refer to pipx's installation instructions here. Once pipx
is set up, install the necessary tools using the following commands.
# Copier: Template rendering for projects.
pipx install copier
# Pipenv: Virtual environment and package manager for Python.
pipx install pipenv
# Pre-commit: Automates Git hooks for code quality checks.
pipx install pre-commit
-
Generate the project.
copier copy gh:serious-scaffold/serious-scaffold-python /path/to/project
-
Navigate to the project directory and initialize a git repository.
cd /path/to/project git init
-
Set up the development environment.
make dev
-
Commit the initialized project.
git add . git commit -m "Initialize from serious-scaffold-python."
-
That's it! Feel free to focus on the coding within
src
folder.
Badge for markdown:
[![Serious Scaffold Python](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/logo.json)](https://serious-scaffold.github.io/serious-scaffold-python)
Badge for restructuredtext:
.. image:: https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/logo.json
:target: serious-scaffold.github.io/serious-scaffold-python
MIT License, for more details, see the LICENSE file.