atpublic
Keep all y'all's __all__'s in sync
What it is and what it does
atpublic is a lightweight library that provides two decorators—@public and @private—to explicitly mark which names in a Python module are part of its public API. Instead of manually maintaining __all__, you decorate the names you want to export, and the library keeps __all__ synchronized automatically. It also includes a function to infer all public names and populate __all__ for you if you prefer a declarative approach.
The package has no runtime dependencies and installs as a pure Python wheel, making it trivial to add to any project. It is designed for developers who want to be explicit about module boundaries and ensure their public API is clearly documented without the friction of maintaining __all__ by hand.
Use it for:
- Maintain a clean public API in library modules without manually editing __all__ every time you add or remove a function.
- Document which names are intentionally public versus internal implementation details for other developers reading your code.
- Automatically generate __all__ for a module by decorating public functions and classes, then calling the inference function.
- Enforce API boundaries in large packages where multiple modules need consistent visibility rules.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides @public and @private decorators to document module visibility and automatically keep __all__ in sync with your public API.
Yes, if you want a simple, zero-dependency way to keep __all__ in sync with your public API. The package is stable and mature, installs cleanly, and solves a real friction point in module design. The aging maintenance status is not a concern for a feature-complete utility, but verify that it still works well with your Python version (requires 3.10+).
Install
atpublic on PyPI
pip
pip install atpublicuv
uv add atpublicpoetry
poetry add atpublicInstalling atpublic
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance status is aging—last release was 258 days ago—but the package is classified as Production/Stable and Mature, suggesting it is feature-complete rather than abandoned.
License in practice
Licensed under Apache License 2.0 (permissive). You may use, modify, and distribute this package freely in commercial and private projects, with minimal restrictions.
Quickstart
pip install atpublic
from atpublic import public
@public
def my_function():
pass
Requires Python 3.10 or later.
Verify before relying
- Whether the package is actively maintained or in stable maintenance mode (repo activity not provided).
- Real-world adoption patterns and whether the decorator approach scales well in large codebases.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 258 days since the last release |
| First released | |
| Downloads | 8,535,644/month — #1,608 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: atpublic-7.0.0-py3-none-any.whl
Keywords: __all__, private, public
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
publicProvides a decorator-based alternative to…
permissive · top 15,000 on PyPI
publicationPublication hides private implementation…
permissive · top 5,000 on PyPI
botoinatorBotoinator lets you attach decorators to boto3…
permissive · top 15,000 on PyPI
lazy-loaderLazy-loader defers the import of subpackages…
permissive · top 1,000 on PyPI
sphinx-autodoc2sphinx-autodoc2 generates API documentation for…
permissive · top 15,000 on PyPI
publicsuffixlistParses the Public Suffix List to extract the…
copyleft · top 5,000 on PyPI
wraptwrapt provides a Python module for building…
permissive · top 100 on PyPI
venusianVenusian defers decorator actions from import…
permissive · top 5,000 on PyPI
undecoratedStrips decorators from Python functions,…
permissive · top 15,000 on PyPI