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 CLI tool that scaffolds modern Python projects with sensible defaults for packaging, linting, testing, typing, and CI.

What It Generates

  • Interactive project setup with input validation
  • src/-layout package structure
  • PEP 621-compliant pyproject.toml
  • Optional dynamic versioning helper in scripts/setup.py
  • Optional GitHub Actions workflow
  • Ready-to-use quality tooling configuration

Installation

Install from source (development)

python -m pip install -e .

Install for CLI usage

Linux/macOS:

python3 -m pip install --user pyforge

Windows:

py -m pip install --user pyforge

With pipx:

pipx install pyforge

Usage

Run:

pyforge

Follow the prompts, review the summary, and confirm project generation.

The generated project can optionally include a local virtual environment and install:

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

Development

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

Build Distributions

python -m pip install --upgrade pip setuptools wheel build
python3 scripts/setup.py sdist bdist_wheel

Build artifacts are written to dist/.

Validate Distributions

python -m twine check dist/*

Publish to PyPI

  1. Create a PyPI API token.
  2. Export credentials:
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-XXXXXXXXXXXXXXXXXXXXXXXX
  1. Upload distributions:
python -m twine upload dist/*

Optional TestPyPI 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.2.tar.gz (16.5 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.2-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyforge_scaffold-0.0.2.tar.gz
  • Upload date:
  • Size: 16.5 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.2.tar.gz
Algorithm Hash digest
SHA256 fb605b058ce91dbd8deed946818c0d238bf3dd41b0d3df5eb012f2aabf97705e
MD5 787d880b71d1ad9c473dab1fa9e93759
BLAKE2b-256 2450aa952831f4603814714540d045a2f4740ef939de610161a854ca09e85262

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyforge_scaffold-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a273a39e49341fc618c824a29ef06daa338abf71862b07a2fba88f099d3bb635
MD5 25a252701aab47bf55b8d3bc14544928
BLAKE2b-256 0627461e82f284afb516278f16894cb7835d59861a9d7c4968c1d939b2a52b18

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