cookiecutter /
cookiecutter
A cross-platform command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, C projects.
91/100 healthLoading repository data…
cookiecutter-serious / repository
A cookiecutter Python CLI template with setup.py, pytest and many pytest plugins.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A python CLI template with setup.py, pytest and many pytest plugins.
Now, it supports:
Other features:
git tagsrc, while test code is under tests (See Packaging a python library)Most people say, Python is not suitable for a big project.
I don't agree with that.
For one thing, most projects are not a real big project, with millions of code. For another, most Python developers are junior, compared with some other languages like Java. They are focusing on functions, while making their growing project to a mass of shit. In some cases, a growing Python project is a growing single file.
I start this project to prove that Python can also construct a serious maintainable project.
A serious python project should start and keep a 100% coverage, at least for unit tests. Compilation can prevent syntax or other low level issues, while Python don't have it. So without 100% test coverage, you may be suffered. Besides, with various linters, the maintainability will be good enough.
Of course, there will be some costs in your development efficiency. But you can trade it with maintainability freely: Deliver functions without tests, than make up afterwards, with a good project structure.
After some time, you can fly again. You will be used to TDD, and the guide of linters. When you are experienced, the cost will be less and less.
Install cookiecutter command line:
pip install cookiecutter
Generate a new CookieCutter template layout:
cookiecutter gh:cookiecutter-serious/pycli
# or
cookiecutter https://github.com/cookiecutter-serious/pycli.git
After the project is generated, setup the development environment like that:
cd demo-project
git init
git add .
git cm -m 'Initialize the project with cookiecutter-serious/pycli'
virtualenv -p python3 .env
. .env/bin/activate
pip install -e .[dev]
Now, you can develop and run tests.
Note: A recent version of setuptools is necessary.
Besides, it may be required to install setuptools-scm and pytest-runner manually,
in some environment depending on proxy.
If there is any problem when installing with pip, try to prepare these first:
pip install -U setuptools
pip install setuptools-scm pytest-runner
pytest
# or
./setup.py test
pytest --no-pylint -m unit
A unit test is for a function or class method.
pytest --no-pylint -m integration
An integration test is for a module or interface.
Besides, for some reasons, pylint will always run without --no-pylint.
Sometimes, test results with and without coverage are different. Then this will help.
pytest --no-cov
Any linter can be executed independently, like flake8:
pytest --no-pylint --no-cov -m flake8
Or pylint:
pytest --no-cov -m pylint
This project is under the term of MIT license. Projects generated by this project are the same, so you have to change it manually if needed.
Selected from shared topics, language and repository description—not editorial ratings.
cookiecutter /
A cross-platform command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, C projects.
91/100 healthcookiecutter /
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.
96/100 healthcookiecutter-flask /
A flask template with Bootstrap, asset bundling+minification with webpack, starter templates, and registration/authentication. For use with cookiecutter.
91/100 healthaudreyfeldroy /
Cookiecutter template for a Python package.
87/100 healthosprey-oss /
A modern cookiecutter template for Python projects that use uv for dependency management
87/100 healthrochacbruno /
This template is **archived**. > UV can now [generate a sample project](https://docs.astral.sh/uv/guides/projects/#creating-a-new-project) > I recommend using **UV** to bootstrap your peojects. > [Copier](https://github.com/copier-org/copier) is a tools that can bootstrap projects from templates.
35/100 health