Skip to main content

A lightweight CLI tool for generating modern Python project structures with best practices built in

Project description

pyforge

pyforge is a lightweight CLI that generates a modern Python project scaffold with sensible defaults for packaging, linting, testing, typing, and CI.

Features

  • Interactive project setup with input validation
  • src-layout package structure
  • PEP 621 pyproject.toml generation
  • Optional dynamic versioning helper at scripts/setup.py
  • Optional GitHub Actions CI workflow
  • Ready-to-use test and quality tool configuration

Install

For local development:

python -m pip install -e .

Global user install (recommended for CLI usage):

Linux/macOS:

python3 -m pip install --user pyforge

Windows:

py -m pip install --user pyforge

If you use pipx:

pipx install pyforge

Usage

Run the CLI:

pyforge

Answer the prompts, review the summary, and confirm generation.

By default, pyforge can also bootstrap a .venv inside the generated project and install either:

  • -e .[dev] when recommended packages are enabled
  • -e . otherwise

Development Setup

python -m pip install -e .[dev]
pre-commit install

Build Package

Create source and wheel distributions:

python -m build

The artifacts will be created under dist/.

Validate Package Metadata

Check long description and distribution metadata:

python -m twine check dist/*

Upload To PyPI

  1. Create an API token in your PyPI account.
  2. Set it as an environment variable:
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-XXXXXXXXXXXXXXXXXXXXXXXX
  1. Upload:
python -m twine upload dist/*

Use TestPyPI first if you want a dry run:

python -m twine upload --repository testpypi dist/*

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

pyforge_scaffold-0.0.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

pyforge_scaffold-0.0.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file pyforge_scaffold-0.0.1.tar.gz.

File metadata

  • Download URL: pyforge_scaffold-0.0.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pyforge_scaffold-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7d7f307910aed7875d3ad7e4134ed8cfb292496d802aadbfd718b7f1e0018df8
MD5 7df5ae37efdf04644578b2f7a09db890
BLAKE2b-256 7399d2a688985794404aed5bc85576a06a36165ecbf5e78a462d5052569e8406

See more details on using hashes here.

File details

Details for the file pyforge_scaffold-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyforge_scaffold-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a42b18aa143c9c4b3bbcd94ae27baf63360359883fc31ee10a529ac0bee575f2
MD5 f5d467564c5feb57b78c0ed7d166e65d
BLAKE2b-256 a4a7322f1d054ae8a606f2e77f429354cbe523fee64925f4a93ce66abe94452c

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