Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

create-python-skeleton

A lightweight, security-conscious Python CLI scaffolder using Bash, uv and GNU Make.

Features

  • Python 3.13 and src/ layout
  • Click, Rich and Loguru
  • Dependency management with uv
  • Hatchling build backend
  • Ruff, strict mypy and pytest
  • Bandit for static security analysis
  • pip-audit for dependency vulnerability scanning
  • Gitleaks for secret detection
  • CycloneDX SBOM generation
  • Secure logging defaults
  • Git initialization

Installation

Requirements: Bash, uv, Git, GNU Make and Gitleaks.

On Ubuntu:

sudo apt install git make gitleaks

Install the scaffolder:

git clone https://github.com/falkowich/create-python-skeleton.git
cd create-python-skeleton
install -Dm755 create-skeleton ~/.local/bin/create-skeleton

Usage

create-skeleton PROJECT_NAME [OPTIONS]

Options

Switch Description
--api Include HTTPX, Pydantic Settings and python-dotenv
--db Include SQLAlchemy, Alembic and Psycopg
--no-install Skip dependency resolution and installation
--no-git Skip Git initialization
--help Show usage
--version Show version

Examples

create-skeleton my-project
create-skeleton api-client --api
create-skeleton database-tool --db
create-skeleton service-tool --api --db
create-skeleton review-project --no-install --no-git

Dependencies

Group Packages
Runtime click, rich, loguru
API httpx, pydantic-settings, python-dotenv
Database sqlalchemy, alembic, psycopg
Development ruff, mypy, pytest, pytest-cov, ptpython
Security bandit, pip-audit
External gitleaks

Generated structure

my-project/
├── .gitignore
├── .gitleaks.toml
├── .python-version
├── Makefile
├── README.md
├── pyproject.toml
├── uv.lock
├── src/
│   └── my_project/
│       ├── __init__.py
│       ├── __main__.py
│       ├── main.py
│       └── py.typed
└── tests/
    └── test_cli.py

CLI switches

uv run my_project --help
uv run my_project --verbose
uv run my_project --quiet
uv run my_project --no-color
Switch Description
--verbose, -v Enable debug logging
--quiet, -q Reduce logging verbosity
--no-color Disable colored output
--help Show CLI help

Make targets

Development

Target Description
make install Synchronize locked dependencies
make lock Resolve dependencies
make lock-check Validate lockfile
make env-check Validate installed environment
make format Format source code
make format-check Verify formatting
make fix Apply lint fixes
make lint Run Ruff
make typecheck Run mypy
make test Run pytest with coverage
make clean Remove generated artifacts
make help Show available targets

Security and supply chain

Target Description
make sast Bandit static security analysis
make sca Audit locked external dependencies
make sca-lock Export and audit locked dependencies
make secrets Scan working directory
make secrets-staged Scan staged Git changes
make secrets-history Scan available Git history
make sbom Generate CycloneDX SBOM
make security Run security checks
make supply-chain Run dependency checks and generate SBOM
make check Run local quality and security gates
make ci Run extended verification

Security defaults

  • Strict dependency auditing, excluding the local project package.
  • Locked runtime and development dependencies.
  • No implicit dependency synchronization during verification.
  • Redacted Gitleaks findings.
  • Secure Loguru exception configuration.
  • Restricted project name validation.
  • Restrictive file creation permissions.
  • No automatic deletion of partially generated projects.

Security reports are stored in reports/ and excluded from Git.

Gitleaks uses 8.16-compatible command syntax, targeting Ubuntu 26.04. A recent uv release supporting CycloneDX exports is required.

These controls provide a development security baseline, not a guarantee of application or supply chain security.

Typical workflow

create-skeleton my-project --api
cd my-project

make fix
make format
make check
make supply-chain

Update dependencies:

uv lock --upgrade
make install
make check

Design philosophy

  • Minimal infrastructure.
  • Opinionated development defaults.
  • Explicit dependency management.
  • Visible security controls.
  • No mandatory Docker, CI/CD or Git hooks.
  • Generated projects remain standalone.

Bash + uv + Make. Keep it simple.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages