Skip to main content

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:

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 -
  1. Create a new GitHub repository using this template (green Use this template button)
  2. Name your repo (use underscore _, not hyphens -)
  3. Add project description (necessary!)
  4. Wait until the setup commit appears (performed by github-actions[bot], it may take a few minutes)
  5. Clone the repository
  6. Run pdm setup command locally to setup development environment

[!IMPORTANT] For more details read the documentation

Usage

  1. Create a new branch
  2. Optionally add dependencies to pyproject.toml
  3. Write code in /src/<project_name> and tests in /tests
  4. Use git add, git commit and git push your changes
  5. pre-commit will 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 named dev-<group>)
  • Modify [tool.pdm.scripts] for custom command (check-<group> or fix-<group>, the latter modifies files)
  • Use [tool.<name>] to adjust specific tool configuration

Adjusting these sections will affect pre-commit and GitHub 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>-fix and <group>-check for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opentemplate-0.0.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opentemplate-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

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

Hashes for opentemplate-0.0.1.tar.gz
Algorithm Hash digest
SHA256 696ab8934568a504a18f785e3daaaa124a89e33e81dd17feac32379774687bf6
MD5 a4729d63d3384d36cb398aa64fe5d6df
BLAKE2b-256 5817e4311d60dcf2154c1a0a9fcf0d6059a44a15ea290660130e3390a07a627d

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentemplate-0.0.1.tar.gz:

Publisher: release.yml on open-nudge/opentemplate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for opentemplate-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0fde5a37fc233be99e24fcc11112a6fe7e329e0a0777e96daa00cc88d2ff8144
MD5 8d4335ffde2af0856240c07f7c30e24d
BLAKE2b-256 b750f29b085e75a3e2431beebcd2bd736deac879d80da010803e89866743c031

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentemplate-0.0.1-py3-none-any.whl:

Publisher: release.yml on open-nudge/opentemplate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page