{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/10"}],"enrichment":{"capability":"Provides a decorator to mark functions as entry points, eliminating boilerplate code for console script execution while preventing accidental execution on import.","skillfed_tags":["cli-scripting","decorator-pattern"],"use_cases":["Simplify CLI script definitions by replacing repetitive `if __name__ == \"__main__\":` blocks with a clean decorator.","Ensure main functions are never accidentally executed during module imports in larger projects.","Build command-line tools where you want explicit, type-safe entry point declarations.","Migrate existing scripts to a more declarative entry point style without changing logic.","Enforce consistent entry point patterns across a team or codebase."],"what_it_does":"entrypoint is a lightweight decorator library that simplifies defining console entry points in Python scripts. Instead of writing the standard `if __name__ == \"__main__\":` boilerplate, you decorate your main function with `@entrypoint(__name__)` and it executes only when the script runs directly, not when imported. The library depends on attrs, named, and typing-aliases for its implementation.\n\nThe package offers multiple usage patterns: a simple decorator form for immediate execution, a `.call()` method for manual control over when the function runs, and an `is_main()` function that mimics the traditional `if __name__ == \"__main__\":` check. It enforces the convention that entry point functions take no arguments and return nothing, though this is only validated by type-checkers, not at runtime.","worth_installing":"Yes, if you write console scripts regularly and want cleaner, more explicit entry point declarations. The package is stable, has no security issues, and adds minimal dependency weight. The dormant maintenance is not a concern\u2014it is feature-complete and unlikely to need updates. Install it for codebases where you value readability and consistency in script structure."},"id":"entrypoint","links":{"html":"https://skillfed.io/packages/entrypoint","md":"https://skillfed.io/packages/entrypoint.md","pypi":"https://pypi.org/project/entrypoint/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-06-16","license_spdx":null,"license_treatment":"permissive","name":"entrypoint","python_support":"supports_current","summary":"Decorated functions as entry points."},"popularity":{"monthly_downloads":110357,"position":12467,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.1.0"}
