Skip to content

joaopalmeiro/template-python-package

Repository files navigation

template-python-package

Hatch project Ruff

Opinionated Python template for new packages.

Getting Started

  1. Go to or create the package folder.
  2. Get the template files:
npx degit github:joaopalmeiro/template-python-package

or

npx degit github:joaopalmeiro/template-python-package --force
  1. Search for template-python-package and replace it with the package name.
  2. Search for template_python_package and replace it with the underscored version of the package name.
  3. Search for Opinionated Python template for new packages. and replace it with the (short) package description.
  4. Search for João Palmeiro and replace it with the author's name.
  5. Search for joaopalmeiro@proton.me and replace it with the author's email address.
  6. Open the pyproject.toml file and add the package-specific dependencies. See the Dependency configuration and Environment configuration pages in the Hatch documentation for more information (if necessary).
  7. Update the Source code link at the top to the package repository link (if necessary).
  8. Change GitHub in the Deployment section to GitLab or Codeberg and update the link to the corresponding Tags page (if necessary).
  9. Update the Issues and Source fields in the pyproject.toml with their respective repository-related links (if necessary).
  10. Delete the TEMPLATE.md file.
  11. Delete the Getting Started section.

Development

Install pyenv (if necessary).

pyenv install && pyenv versions
pip install hatch==1.9.3 && hatch --version
hatch config set dirs.env.virtual .hatch
hatch config show
hatch env create
hatch status
hatch env show
hatch dep show table
hatch run lint
hatch run format

Deployment

hatch version micro
hatch version minor
hatch version major
hatch build --clean
hatch publish

About

Opinionated Python template for new packages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages