{"id":7603,"library":"pyscaffold","title":"PyScaffold","description":"PyScaffold is a template tool designed to quickly set up the scaffold of a Python project, following best practices and integrating with tools like setuptools_scm for version management, tox for testing, and pre-commit for quality control. It is currently at version 4.6 and typically releases minor or patch updates every few months, ensuring compatibility and incorporating improvements.","status":"active","version":"4.6","language":"en","source_language":"en","source_url":"https://github.com/pyscaffold/pyscaffold/","tags":["project generation","scaffolding","cookiecutter alternative","project setup","automation"],"install":[{"cmd":"pip install pyscaffold","lang":"bash","label":"Install PyScaffold"}],"dependencies":[{"reason":"Used for automatic version management based on Git tags.","package":"setuptools_scm","optional":false},{"reason":"Used for determining OS-specific configuration directories; had a breaking change in v4.5.","package":"platformdirs","optional":false}],"imports":[{"note":"While PyScaffold is primarily a command-line tool ('putup'), 'create_project' is the main programmatic entry point for creating projects.","symbol":"create_project","correct":"from pyscaffold.api import create_project"}],"quickstart":{"code":"putup my_new_project\ncd my_new_project\npip install -e '.[dev,test]'\ntox -e py","lang":"bash","description":"Create a new project named 'my_new_project'. Navigate into the directory, install the project in editable mode with development and test dependencies, then run tests using tox."},"warnings":[{"fix":"Manually migrate any custom configuration files from `~/Library/Preferences/PyScaffold` to `~/Library/Application Support/PyScaffold`.","message":"PyScaffold v4.5 changed the default configuration directory on macOS from `~/Library/Preferences` to `~/Library/Application Support`. If you rely on custom PyScaffold configurations stored at the old path, they will no longer be found automatically.","severity":"breaking","affected_versions":">=4.5"},{"fix":"Ensure your environment uses Python 3.7+ (e.g., `python3.x -m pip install pyscaffold` where `x >= 7`).","message":"PyScaffold requires Python 3.7 or newer. Attempting to use it with older Python versions will result in `SyntaxError` or other runtime errors.","severity":"gotcha","affected_versions":"All versions >=4.0"},{"fix":"Update your extension code to use `importlib.resources.files` for resource access, e.g., `importlib.resources.files('my_package').joinpath('data.txt').read_text()`.","message":"For extension developers, PyScaffold v4.6 recommends using `importlib.resources.files` instead of `importlib.resources.read_text` or `pkgutil.get_data` for accessing package data. While old methods still work, they may be deprecated in future Python versions.","severity":"deprecated","affected_versions":">=4.6"},{"fix":"Prefer using `tox` versions outside of the 4.0-4.1 range or upgrade PyScaffold to v4.4 or newer to ensure the generated `tox.ini` template handles this automatically.","message":"Generated `tox.ini` files from PyScaffold v4.4 onwards include workarounds to avoid problematic `tox` versions 4.0 and 4.1. If you manually modify the generated `tox.ini` or use an older PyScaffold version, you might encounter issues with these specific `tox` releases.","severity":"gotcha","affected_versions":"<4.4 with tox 4.0/4.1"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure PyScaffold is installed (`pip install pyscaffold`) and that your Python environment's script directory is included in your system's PATH. If using `pipx`, ensure `pipx ensurepath` has been run.","cause":"The `putup` command is not in your system's PATH, or PyScaffold was not installed correctly.","error":"putup: command not found"},{"fix":"If you intend to overwrite the directory, add the `--force` flag: `putup my_project --force`. Otherwise, choose a different project name.","cause":"PyScaffold prevents overwriting existing directories by default to avoid accidental data loss.","error":"Directory 'my_project' already exists. Use --force to overwrite."},{"fix":"First, ensure the extension package is installed (e.g., `pip install pyscaffoldext-xyz`). Then, verify the extension name is correct (e.g., `putup my_project --extension some_extension`). Check PyScaffold's documentation or PyPI for available extensions and their exact names.","cause":"You tried to use an extension (`--extension xyz`) that is either not installed or misspelled.","error":"ValueError: No such extension found: 'xyz'"}]}