Registry / devops / pyscaffold

pyscaffold

JSON →
library4.6pypypi✓ verified 87d ago

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.

pip install pyscaffold
INSTALL
IMPORT
SIG · PYSCAFFOLD
P
pyscaffold
devopspythonv4.6
Install
2.5s avg
Import
282ms
Disk
23MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.290s · 21.6MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.5s · import 0.274s · 22MB
23MB installed
● package 23MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

create_project
from pyscaffold.api import create_project
While PyScaffold is primarily a command-line tool ('putup'), 'create_project' is the main programmatic entry point for creating projects.

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.

putup my_new_project cd my_new_project pip install -e '.[dev,test]' tox -e py
putup --version
Debug
Known issues
breakingPyScaffold 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.
fix
Manually migrate any custom configuration files from `~/Library/Preferences/PyScaffold` to `~/Library/Application Support/PyScaffold`.
affects: >=4.5
gotchaPyScaffold requires Python 3.7 or newer. Attempting to use it with older Python versions will result in `SyntaxError` or other runtime errors.
fix
Ensure your environment uses Python 3.7+ (e.g., `python3.x -m pip install pyscaffold` where `x >= 7`).
affects: All versions >=4.0
deprecatedFor 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.
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()`.
affects: >=4.6
gotchaGenerated `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.
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.
affects: <4.4 with tox 4.0/4.1
Errors
Common errors & fixes
putup: command not found
The `putup` command is not in your system's PATH, or PyScaffold was not installed correctly.
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.
Directory 'my_project' already exists. Use --force to overwrite.
PyScaffold prevents overwriting existing directories by default to avoid accidental data loss.
fix
If you intend to overwrite the directory, add the `--force` flag: `putup my_project --force`. Otherwise, choose a different project name.
ValueError: No such extension found: 'xyz'
You tried to use an extension (`--extension xyz`) that is either not installed or misspelled.
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.
Upgrade
Version history
4.6latest on PyPI · released Sep 23, 2024
Audit
Dependencies
setuptools_scmrequiredUsed for automatic version management based on Git tags.
platformdirsrequiredUsed for determining OS-specific configuration directories; had a breaking change in v4.5.
Agent activity
2 hits · last 30 days
node
2
Resources
pyscaffold — pip install pyscaffold · libregistry