Skip to content

managedkaos/python-container-template

Repository files navigation

python-container-template

A template repo for container-ized Python applications.

Development Setup

This template includes pre-commit hooks for code quality and security checks. To set up the development environment:

  1. Install development dependencies:

    make development-requirements
  2. Install pre-commit hooks:

    make pre-commit-install
  3. Run pre-commit on all files (optional):

    make pre-commit-run

Pre-commit Hooks

The following hooks are configured to run automatically on commit:

  • Black: Code formatting with consistent style
  • isort: Import sorting and organization
  • flake8: Linting for code quality
  • bandit: Security vulnerability scanning
  • detect-secrets: Secret detection in code
  • Various checks includings:
    • Merge conflict detection
    • YAML/JSON validation
    • Large file detection
    • Trailing whitespace removal
    • End-of-file fixes

Available Make Targets

  • make development-requirements - Install development dependencies
  • make pre-commit-install - Install pre-commit hooks
  • make pre-commit-run - Run pre-commit on all files
  • make pre-commit-clean - Remove pre-commit hooks
  • make lint - Run linting tools manually
  • make fmt - Format code with black and isort

About

A template repo for container-ized Python applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages