skillfed

atpublic

Keep all y'all's __all__'s in sync

atpublic v7.0.0 8.5M downloads/30d#1,608 on PyPI
Permissive license Apache-2.0 AGING released

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 atpublic

uv

uv add atpublic

poetry

poetry add atpublic

Installing 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

Development Status :: 5 - Production/StableDevelopment Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

__all__ managementpublic private decoratorsmodule visibility documentationapi exposure controlpython __all__ sync
api-designmodule-introspection

More Libraries packages