https://github.com/nens/cookiecutter-python-template
Cookiecutter template for a plain python project or library
https://github.com/nens/cookiecutter-python-template
Last synced: 23 days ago
JSON representation
Cookiecutter template for a plain python project or library
- Host: GitHub
- URL: https://github.com/nens/cookiecutter-python-template
- Owner: nens
- License: mit
- Created: 2018-12-04T22:59:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-11-19T18:18:03.000Z (7 months ago)
- Last Synced: 2025-11-19T20:08:38.030Z (7 months ago)
- Language: Python
- Size: 258 KB
- Stars: 0
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# N&S python/django project cookiecutter template
Template for [cookiecutter](https://cookiecutter.readthedocs.io) so that
you can create a fresh plain python project or library.
## Using this cookiecutter template
Install/upgrade cookiecutter:
$ uv tool install cookiecutter --upgrade
Run the following command and answer the questions:
$ cookiecutter https://github.com/nens/cookiecutter-python-template
This cookiecutter can also generate a **django** project for you:
$ cookiecutter --directory django https://github.com/nens/cookiecutter-python-template
## Development of this template itself
Just do the regular:
$ uv sync
$ uv run pytest
$ pre-commit run --all
The basic setup of [nens-meta](https://nens-meta.readthedocs.io/) should be used in this cookiecutter template, of course. You *can* run `uvx nens-meta` inside the `{{ cookiecutter.project_name }}/` directory, nens-meta is tweaked to work in such a directory.
The `django/` directory contains customisations to work with django projects. I wanted to keep most of the files the same, of course. This is done with symlinks. From time to time, run the script that syncs django to the regular template:
$ uv run symlink_into_django_template.py
It will create missing symlinks, show which files are existing symlinks and which files are custom. The custom files are printed with `diff -u` instructions so that you can easily spot the differences.