https://github.com/trailofbits/cookiecutter-python
A cookiecutter template for a best-practices Python project
https://github.com/trailofbits/cookiecutter-python
Last synced: about 1 year ago
JSON representation
A cookiecutter template for a best-practices Python project
- Host: GitHub
- URL: https://github.com/trailofbits/cookiecutter-python
- Owner: trailofbits
- License: apache-2.0
- Created: 2023-03-10T22:46:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-03T21:07:55.000Z (over 1 year ago)
- Last Synced: 2025-03-28T12:51:14.838Z (about 1 year ago)
- Language: Python
- Size: 78.1 KB
- Stars: 14
- Watchers: 12
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cookiecutter-python
This repository contains a
[Cookiecutter](https://github.com/cookiecutter/cookiecutter) template
for a Python package.
It's designed primarily for Trail of Bits' own use, but should be usable
by anyone.
Both command-line and library packages can be generated.
## Usage
- Install [`uv`](https://docs.astral.sh/uv/)
```bash
# On any platform with cURL and sh
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# With Brew
brew install uv
```
Please refer to [`uv` documentation](https://docs.astral.sh/uv/getting-started/installation/) for more installation options.
- Use `cookiecutter` to generate a project using this template:
```bash
# creates the project directory in $PWD
uvx cookiecutter gh:trailofbits/cookiecutter-python
```
Alternatively, tell `cookiecutter` where to put the new project directory:
```bash
# creates ~/tmp/$project
uvx cookiecutter -o ~/tmp gh:trailofbits/cookiecutter-python
```
`cookiecutter` will prompt you for the project's name and all other relevant
metadata.
## Note
The project will be generated using `uv`, a near drop-in replacement for
`pip` which is still in active development.
Packages are installed using `uv pip install ` (after
activating the virtual environment).