--- id: public version: "2020.12.3" license: Unlicense license_treatment: permissive maintenance: abandoned --- # public — replace __all__ with @public.add decorator License: permissive · Maintenance: abandoned · Downloads: 107.9K/mo ## What it is and what it does The public package replaces Python's traditional `__all__` list with a `@public.add` decorator. Instead of manually maintaining a list of exported names at the top of a module, you decorate each function, class, or name you want to export, and the package automatically populates `__all__` for you. This can reduce boilerplate and keep export declarations close to their definitions. The package has no runtime dependencies and works by modifying the module's `__all__` attribute as decorators are applied. It supports decorating functions and classes individually, or calling `public.add()` with string names to add arbitrary exports. However, the project is abandoned with no updates since 2020-12-03, so it may have compatibility issues with newer Python versions or lack support for modern language features. Use it for: - Replacing manual `__all__` lists in modules where you prefer keeping export declarations next to their definitions. - Reducing boilerplate in packages with many exported functions or classes by using decorators instead of list maintenance. - Programmatically adding names to `__all__` at module load time without editing the source list. - Teaching or documenting which names are part of a module's public API through decorator syntax. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a decorator-based alternative to Python's `__all__` list for marking which names should be exported from a module or package. No. The package is abandoned (last release 2020-12-03), offers minimal functionality that can be replicated in a few lines of code, and provides no advantage over manually maintaining `__all__`. The decorator pattern it provides is a stylistic choice with no functional benefit, and the lack of maintenance creates risk for compatibility issues. ## Install pip install public uv add public poetry add public ## Installing public Before you install: High install friction with no runtime dependencies. The package is abandoned—last release was 2020-12-03 with no commits since—and has not been maintained. Use only if the decorator pattern is essential to your workflow. License in practice: Licensed under Unlicense (public domain), permissive treatment. You may use, modify, and distribute freely with no restrictions or attribution requirements. Quickstart: pip install public import public @public.add def func(): pass print(__all__) # ['func'] Verify before relying: - Whether the package works correctly with modern Python versions beyond those tested at release time. - Whether the decorator correctly handles edge cases like nested modules or dynamic imports. - Performance or compatibility impact when used in large codebases with many exports. ## Package facts - License: Unlicense (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 107.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python __all__ decorator, module export decorator, public api marker, replace __all__ python, module visibility control, python package exports, dynamic __all__ management, module-metadata, abandoned [View on SkillFed](https://skillfed.io/packages/public) · [View on PyPI](https://pypi.org/project/public/)