Skip to main content

Template for new Python projects.

Project description

PythonTemplateIt

Category Status and Links
General
CD/CI
PyPI
Github

Template for Python projects with standardized tooling, automation scripts, and reusable GitHub workflows.


Overview

This repository is a starter template for Python services in the BrightEdgeeServices and RealTimeEvents ecosystem. It provides a baseline for packaging, linting, testing, environment provisioning, and release automation.


Requirements

  • Python 3.12+
  • Poetry
  • Docker (optional, for local MySQL service)
  • Pre-commit
  • GitHub access token(s) for private dependency repositories

Quick Start

# 1) Prepare local environment variables
.\SetupDotEnv.ps1

# 2) Configure private dependency access
.\SetupPrivateRepoAccess.ps1

# 3) (Optional) Configure GitHub CLI access for repository tasks
.\SetupGitHubAccess.ps1

# 4) Install project and dev dependencies
.\InstallDevEnv.ps1

# 5) Start local database (optional)
docker compose up -d db

# 6) Run tests
poetry run pytest

Script Overview

  • Install.ps1: Initializes Poetry tooling and installs dependencies.
  • InstallDevEnv.ps1: Installs dev dependencies, syncs Poetry environment, and updates pre-commit hooks.
  • SetupDotEnv.ps1: Generates a .env file from current environment variables.
  • SetupPrivateRepoAccess.ps1: Configures Poetry sources and credentials for private repositories.
  • SetupGitHubAccess.ps1: Configures GitHub authentication for local automation tasks.
  • SetUpDocker.ps1: Installs and configures Docker support on development machines.
  • CreateDbSqlScript.ps1: Creates SQL bootstrap script for local MySQL setup.

Release Notes Update Process

  1. Commit the current implementation or stage all intended release changes.

  2. Compare the current branch against master:

    git rev-parse --abbrev-ref HEAD
    git diff --name-status master...HEAD
    git diff --shortstat master...HEAD
    
  3. Add a new top section in ReleaseNotes.md using grouped headings, a timestamp, and summary statistics. Git-tracked diffs already exclude .gitignore entries.

  4. Update the package version in pyproject.toml using SemVer.

  5. Push changes and create a PR.


Active Workflows

  • .github/workflows/py-temp-pr-pub-no_docker-def.yaml: Pull request validation workflow.
  • .github/workflows/py-temp-publish-pub-build_release_notify_after_merge-def.yaml: Release build/publish and notification on merge to master.

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

pythontemplateit-0.5.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

pythontemplateit-0.5.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pythontemplateit-0.5.0.tar.gz.

File metadata

  • Download URL: pythontemplateit-0.5.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.11 Linux/6.11.0-1018-azure

File hashes

Hashes for pythontemplateit-0.5.0.tar.gz
Algorithm Hash digest
SHA256 54d320236dcfb438706e680e0e32874a9800f992ca248be6dd746b4bb6567a5e
MD5 0c25c6078b1246fc39b50a9f53b5a762
BLAKE2b-256 1c7ddffe9d96ca9ba636e5360ece830392ed6dba15be4e0f47bebc7a3056c48e

See more details on using hashes here.

File details

Details for the file pythontemplateit-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: pythontemplateit-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.11 Linux/6.11.0-1018-azure

File hashes

Hashes for pythontemplateit-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f64b61588a92dde0b0f59154f4f849ed33324c53cec1087309156a9d3db24473
MD5 0273eb2458812a4c7c7ae00be61d810b
BLAKE2b-256 5444aa6979834bdeef00c17a76e2eecc1320d8e367b67c56421f58243d790e30

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