An open API service indexing awesome lists of open source software.

https://github.com/npikall/py-bootstrap

A modern Python Package Template
https://github.com/npikall/py-bootstrap

copier python template uv

Last synced: 3 months ago
JSON representation

A modern Python Package Template

Awesome Lists containing this project

README

          

# PyBootstrap

[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-orange.json)](https://github.com/copier-org/copier)
![Code Quality](https://github.com/npikall/py-bootstrap/actions/workflows/code_quality.yml/badge.svg)
![Documentation](https://github.com/npikall/py-bootstrap/actions/workflows/docs.yml/badge.svg)

This template sets up a structure for you to write a python package.
It comes filled with a bunch of modern features from the python ecosystem.

> [!NOTE]
> This template tries to follow the [Python Developer Tooling Handbook][Handbook]

![casette](docs/assets/casette.gif)

## :battery: All Batteries included

- :wrench: CI pipelines for `Github Actions` and `Gitlab`
- :scroll: Documentation from [Zensical] or [Material for MKDocs]
- :zap: Fast environment and project management with [uv]
- :musical_note: Task orchestration with [Just]
- :black_nib: Preconfigured Licenses to choose from
- :books: autogenerated Changelog with [Git Changelog]
- :straight_ruler: Testing setup with `pytest`
- :fishing_pole_and_fish: Pre-commit Hooks with [`Pre-commit`][Pre-commit] or [`Prek`][Prek]
- :mag: Code Quality assurance with [ruff] and [ty]

## Useage

To install the `copier` tool with [uv] run:

```console
uv tool install copier --with copier-templates-extensions
```

To initialize a new repository with the `copier` template run the following command:

```console
copier copy --trust "gh:npikall/py-bootstrap" path/to/project/
```

You will be prompted and then your repo will be setup.

## First Steps

After you have just used the `copier` to create this repo, you might want to run the following commands:

- `just init` to initialize a `git` repository
- `just venv` to create a virtual environment

[Just]: https://github.com/casey/just
[Zensical]: https://zensical.org/
[Material for MKDocs]: https://squidfunk.github.io/mkdocs-material/
[uv]: https://docs.astral.sh/uv/
[ruff]: https://docs.astral.sh/ruff/
[ty]: https://docs.astral.sh/ty/
[Handbook]: https://pydevtools.com/handbook/explanation/modern-python-project-setup-guide-for-ai-assistants/
[Prek]: https://prek.j178.dev
[Pre-commit]: https://pre-commit.com
[Git Changelog]: https://pawamoy.github.io/git-changelog/