Skip to content

fbidu/cookie-py

Repository files navigation

Bidu's Python Cookiecutter

License: GPL v3

cookiecutter gh:fbidu/cookie-py


🇬🇧 English Description

Esse é um modelo básico de cookiecutter para projetos Python que inclui várias ferramentas modernas que gosto de usar.

Um modelo de cookiecutter serve para criar novos projetos com base em um formato pré-definido. No caso em todo projeto Python, eu gosto de usar certas ferramentas como Ruff, PyTest, Pyright, Pre-Commit e uv. Esse meu modelo instala tudo e configura tudo isso para mim!

É um modelo fortemente enviesado para o que eu gosto, uma vez que ele reflete minhas escolhas particulares sobre ferramentas, análises estáticas, hooks e etc.

Sinta-se livre para usar, forkear e modificar a vontade!

Uso

  1. Instale o uv
  2. Instale o Cookiecutter
  3. Execute cookiecutter gh:fbidu/cookie-py
  4. O seu terminal irá te perguntar tudo o que precisar!

Itens Inclusos

Itens marcados estão implementados!

  • Usar o uv para gerenciar pacotes e ambientes virtuais
  • Usar o pre-commit para cuidar de hooks pre-commit do git
  • Instalar o Pytest com plugins úteis (coverage, xdist, randomly)
  • Instalar o Ruff para formatação e linting
  • Instalar o Pyright para verificação de tipos
  • Executar Pytest pre-push
  • Relatório de Coverage no Pytest
  • Configurações modernas em pyproject.toml

Hooks de Pre-Commit Habilitados

  • Ruff (linting e formatação)
  • Pyright (verificação de tipos)
  • Bandit (segurança)
  • Hooks básicos (trailing whitespace, end-of-file, etc.)

🇬🇧 English

This is a basic cookiecutter template for Python projects that includes modern tools I like to use.

A cookiecutter template is useful to create new projects based on a pre-defined model. In every Python project I like to use some tools like Ruff, PyTest, Pyright, Pre-Commit and uv. This template installs and sets up all those tools for me!

It is highly opinionated since it reflects my personal choices about tooling, static analysis, hooks and so on.

Feel free to use, fork and modify at will!

Usage

  1. Install uv
  2. Install Cookiecutter
  3. Run cookiecutter gh:fbidu/cookie-py
  4. Your terminal will ask you everything it needs!

Batteries Included

Checked items are implemented

  • Use uv to manage packages and virtual environments
  • Use Pre-commit to handle git pre-commit hooks
  • Install Pytest with useful plugins (coverage, xdist, randomly)
  • Install Ruff for linting and formatting
  • Install Pyright for type checking
  • Run Pytest pre-push
  • Coverage report on Pytest
  • Modern pyproject.toml configuration

Pre-Commit Hooks

  • Ruff (linting and formatting)
  • Pyright (type checking)
  • Bandit (security)
  • Basic hooks (trailing whitespace, end-of-file, etc.)

About

My personal Python cookiecutter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published