README - pypackitup - Python Package Template
Author: Wren J. Rudolph for Wrencode, LLC

# pypackitup - Python Package Template

Template repository for developing Python packages.

Do you like the Python Package Template? Star the repository on GitHub and please consider helping support its ongoing development:

READ THE DOCS HERE!
Detailed documentation can be found at https://pypackitup.wrencode.dev.

### Table of Contents

- About
  - Dependencies
  - Toolchain
- Setup
  - Configuration
  - Version Control
  - Documentation
  - Environment
  - Code

### About

The Python Package Template is an example for Python package development.

#### Dependencies

The Python Package Template does not have any third-party dependencies to run the code. It has several development dependencies, which can be seen in the package `pyproject.toml`.

#### Toolchain

The below tools and resources are used as part of pypackitup:

- uv - package management
- ruff - code linting
- bandit - code security
- make - Makefile build automation
- MkDocs - package documentation
- python-dotenv - programmatic access to environment variables defined in a `.env` file
- pytest - code testing framework
- GitHub Actions - CI/CD
- act - GitHub Actions testing

### Setup

The below list covers all updates needed in the Python Package Template when using it to create a new Python package:

#### Configuration

- `pyproject.toml`: Update all relevant fields as needed for the new package.

#### Version Control

- `.gitignore`: Add any package-specific files that should not be checked in to version control.
- `.github/ISSUE_TEMPLATE/`: Make any package-specific changes to the project issue templates.
- `.github/workflows/python-package.yml`: Update the supported Python versions and add any necessary CI/CD steps.

#### Documentation

- `README.md`: Update the `README.md` with all necessary package documentation.
- `mkdocs.yml`: Update the `nav` section with all necessary pages and their corresponding Markdown files (see below).
- `docs-mkdocs/CNAME`: Update the `CNAME` file with the desired mkdocs documentation GitHub Pages custom domain.
- `docs-mkdocs/extra.css`: Add any custom CSS for the mkdocs documentation.
- `docs-mkdocs/extra.js`: Add any custom JavaScript for the mkdocs documentation.
- `docs-mkdocs/*.md`: Add any necessary Markdown (`.md`) files for pages in the mkdocs documentation.
- `docs-mkdocs/*.svg/*.png/*.jpg/etc.`: Add any necessary images for the mkdocs documentation.

#### Environment

- `.env`: Create a `.env` file from the provided `.env.template` file (run `cp .env.template .env` in the command line) and add any necessary package environment variables.

#### Code

- `src/pypackitup/`: Rename the source code directory to match the project directory and follow the PEP naming conventions for the package.
- `src/pypackitup/__init__.py`: Update the package `__init__.py` with available imports.
- `src/pypackitup/*.py`: Add package code.
- `tests/`: Add tests for package code.

GitHub « Previous Next »