The simplest to use, yet the most comprehensive Python template
Project description
opentemplate
The simplest to use, yet the most comprehensive Python template
✨ Features 🚀 Quick start 📚 Documentation 🤝 Contribute 👍 Adopters 📜 Legal
Features
opentemplate is a Python template with the following features:
- Truly open source: no tokens, no fees, no premium plans, open source software only
- Ease of use:
clone templated repo, run
pdm setupand focus on your code - Consistency:
pre-commitandGitHub Actionsshare the same config (pyproject.toml) - Security: SLSA L3+ (public/enterprise) or L2 (private), OSSF Best Practices
- Batteries included: multiple checkers for Python, YAML, Markdown, prose, etc.
- Performance: Parallel checks, builds, minimally-sized caches and checkouts
Quick start
Installation
[!NOTE] Install
pdm(if you don't have it already), for Linux/MacOS:
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
- Create a new GitHub repository using this template
(green
Use this templatebutton) - Name your repo (use underscore
_, not hyphens-) - Add project description (necessary!)
- Wait until the setup commit appears
(performed by
github-actions[bot], it may take a few minutes) - Clone the repository
- Run
pdm setupcommand locally to setup development environment
[!IMPORTANT] For more details read the documentation
Usage
- Create a new branch
- Optionally add dependencies to
pyproject.toml - Write code in
/src/<project_name>and tests in/tests - Use
git add,git commitandgit pushyour changes pre-commitwill guide you through the process
[!IMPORTANT] For more details read the documentation
Examples
Run checkers or fixers manually (click me)
> pdm check-<group> # pdm fix-<group>
Note that all check and fix commands are grouped for your convenience:
> pdm check-all # pdm fix-all
Adjust template (click me)
Most of the adjustments can be done by only editing
pyproject.toml
Common changes to pyproject.toml:
- Add dev dependencies under
[dependency-groups](everything is nameddev-<group>) - Modify
[tool.pdm.scripts]for custom command (check-<group>orfix-<group>, the latter modifies files) - Use
[tool.<name>]to adjust specific tool configuration
Adjusting these sections will affect
pre-commitandGitHub Actions
Disable some pre-commit check (click me)
Disabling checks should be done cautiously!
pre-commit checks are defined in .pre-commit-config.yaml.
Disable a check using SKIP environment variable:
SKIP='<group1>,<group2>` git commit -m <message>
For details, refer to the id fields in .pre-commit-config.yaml.
Some commands have both
<group>-fixand<group>-checkfor different actions!
Contribute
We welcome your contributions! Start here:
Legal
- This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
- This project is copyrighted by open-nudge - the appropriate copyright notice is included in each file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opentemplate-0.0.1.tar.gz.
File metadata
- Download URL: opentemplate-0.0.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
696ab8934568a504a18f785e3daaaa124a89e33e81dd17feac32379774687bf6
|
|
| MD5 |
a4729d63d3384d36cb398aa64fe5d6df
|
|
| BLAKE2b-256 |
5817e4311d60dcf2154c1a0a9fcf0d6059a44a15ea290660130e3390a07a627d
|
Provenance
The following attestation bundles were made for opentemplate-0.0.1.tar.gz:
Publisher:
release.yml on open-nudge/opentemplate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opentemplate-0.0.1.tar.gz -
Subject digest:
696ab8934568a504a18f785e3daaaa124a89e33e81dd17feac32379774687bf6 - Sigstore transparency entry: 239735330
- Sigstore integration time:
-
Permalink:
open-nudge/opentemplate@3006e6878ed7f8af5f28f1a83155decd46b96f9f -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/open-nudge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3006e6878ed7f8af5f28f1a83155decd46b96f9f -
Trigger Event:
release
-
Statement type:
File details
Details for the file opentemplate-0.0.1-py3-none-any.whl.
File metadata
- Download URL: opentemplate-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fde5a37fc233be99e24fcc11112a6fe7e329e0a0777e96daa00cc88d2ff8144
|
|
| MD5 |
8d4335ffde2af0856240c07f7c30e24d
|
|
| BLAKE2b-256 |
b750f29b085e75a3e2431beebcd2bd736deac879d80da010803e89866743c031
|
Provenance
The following attestation bundles were made for opentemplate-0.0.1-py3-none-any.whl:
Publisher:
release.yml on open-nudge/opentemplate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opentemplate-0.0.1-py3-none-any.whl -
Subject digest:
0fde5a37fc233be99e24fcc11112a6fe7e329e0a0777e96daa00cc88d2ff8144 - Sigstore transparency entry: 239735336
- Sigstore integration time:
-
Permalink:
open-nudge/opentemplate@3006e6878ed7f8af5f28f1a83155decd46b96f9f -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/open-nudge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3006e6878ed7f8af5f28f1a83155decd46b96f9f -
Trigger Event:
release
-
Statement type: