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-scaffold

Windows:

py -m pip install --user pyforge-scaffold

With pipx:

pipx install pyforge-scaffold

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.3.tar.gz (16.8 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.3-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyforge_scaffold-0.0.3.tar.gz
  • Upload date:
  • Size: 16.8 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.3.tar.gz
Algorithm Hash digest
SHA256 f8423ba7e3837852ec8d10e6b74a6732833f17c79f4f6c4906b6baa3435ab551
MD5 c271673670dceed6910264087a96966d
BLAKE2b-256 a8cd99407a8d170c8a9809e85a6405c399c9e680cc3f3c22d68827a89aa9da3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyforge_scaffold-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 770ee7187f8f0680b42691a1528a2a84aa2a1bd4288ed4b8762bbf4f10b44c2a
MD5 d807262d57810c6a79ba7adffdd71891
BLAKE2b-256 252fe5ca91519aea69b0f36520fb002d0b9bb71ccc327bf0d20fd98de78c1ef7

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