Skip to content

munlicode/project-toolkit

Repository files navigation

My Project Toolkit

A collection of personal scripts to automate Python project management.

Installation

This tool is best installed using pipx to make the commands globally available.

pipx install git+ssh://git@github.com/munlicode/project-toolkit.git

Commands

This package provides two main commands:

  • manageall: Scans Python files to automatically generate __all__ lists.
  • autinit: Scans packages to automatically generate lazy-loading __init__.py files.

Configuration

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"
]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages