Skip to main content

template python project with necessary configurations

Project description

pyproject-tmpl

features

  1. pytest
  2. pre-commit
  3. darker for code format
  4. ruff for lint
  5. commitlint for commit message format
  6. typer for cli
  7. sqlmodel for database ORM
  8. alembic for database migration

introduction

the project uses src-layout, includes my_sdk (for publish) and biz (for business logic).

sdk is designed for publish and no need to rename, we use file/folder mapping my_sdk=src/sdk in pyproject.toml.

feel free to rename my_sdk to [the name you want] in the whole project for your own use or publish.

dev

before you start:

  1. must run ./scripts/setup
  2. replace my_sdk with [the name you want] in the whole project
  3. remember to uv pip install -e .[all] to make sure my_sdk is available in development.

unit test

uv run -m pytest

run cli

uv run main.py --help

release sdk

  1. cp .pypirc.example .pypirc
  2. replace your token in .pypirc
  3. git tag vx.y.z
  4. ./scripts/publish

build executable file

./scripts/build

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

pyproject_tmpl-0.1.1.dev11.tar.gz (91.3 kB view details)

Uploaded Source

Built Distribution

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

pyproject_tmpl-0.1.1.dev11-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file pyproject_tmpl-0.1.1.dev11.tar.gz.

File metadata

  • Download URL: pyproject_tmpl-0.1.1.dev11.tar.gz
  • Upload date:
  • Size: 91.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for pyproject_tmpl-0.1.1.dev11.tar.gz
Algorithm Hash digest
SHA256 846a82e9898fd61ec6d968e870bf6a112089c8aa58720572822892c194423d9e
MD5 926ffe4fbd8ac3ed728a67dfef8b284f
BLAKE2b-256 41d9770e3c0946afc278b5ba9b22f696253c36129ca8fd6753b07c18d3b510eb

See more details on using hashes here.

File details

Details for the file pyproject_tmpl-0.1.1.dev11-py3-none-any.whl.

File metadata

File hashes

Hashes for pyproject_tmpl-0.1.1.dev11-py3-none-any.whl
Algorithm Hash digest
SHA256 8399d729f92653d035b642611402d5a6b500ccbbc4e6f629635a0ba8ba37fc7a
MD5 17fccc1b4c768c9b35c6bd48315bf2da
BLAKE2b-256 a962317449c4962e6bec94f95c06e6196133cc0a2e6d24f411d9386a5a8c0079

See more details on using hashes here.

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