A collection of personal scripts to automate Python project management.
This tool is best installed using pipx to make the commands globally available.
pipx install git+ssh://git@github.com/munlicode/project-toolkit.gitThis package provides two main commands:
manageall: Scans Python files to automatically generate__all__lists.autinit: Scans packages to automatically generate lazy-loading__init__.pyfiles.
To use these tools, add the following sections to your project's pyproject.toml file and customize the paths for your project.
Copy this template into your pyproject.toml:
[tool.manageall]
# A list of directories to scan for __all__ generation.
scan_dirs = [
"src/my_package/core",
"src/my_package/modules"
]
# A list of common names to ignore in __all__.
ignore_names = [
"BaseModel",
"UUID",
"Any",
"Optional",
"Union",
"List",
"Dict"
]
[tool.autinit]
# A list of static package paths to process.
static_packages = [
"src/my_package/core",
]
# A list of glob patterns to find packages dynamically.
# Useful for modular architectures (e.g., /modules/*)
dynamic_patterns = [
"src/my_package/modules/*"
]
# A list of glob patterns for packages that MUST be
# eager-loaded (e.g., for SQLAlchemy event listeners).
eager_load_patterns = [
"src/my_package/core/events"
]
# A list of glob patterns for packages that should
# ONLY import submodules and export no symbols.
side_effect_patterns = [
"src/my_package/core/events"
]