atpublic
v9.0.0Keep all y'all's __all__'s in sync
$ uv add atpublic======================
@public and @private
This library provides two very simple decorators that document the public visibility of the names in your module. They keep your module's __all__ in sync so you don't have to.
Also included is a function that you can put at the bottom of your module to simply infer all the public names, and populate the __all__ for you.
Installation
$ pip install atpublic
The install extra additionally installs @public and @private into builtins, so they're always available without having to import them first:
$ pip install atpublic[install]
Note that while the top-level module is named public, the PyPI package is called atpublic due to a name conflict. Do not install public; that is a different package!
Author
public is Copyright (C) 2004-2026 Barry Warsaw <[email protected]>
Licensed under the terms of the Apache License Version 2.0. See the LICENSE file for details.
Project details
- Project home: https://gitlab.com/flufl/public
- Report bugs at: https://gitlab.com/flufl/public/-/work_items
- Code hosting: https://gitlab.com/flufl/public.git
- Documentation: https://public.readthedocs.io
- PyPI: https://pypi.org/project/atpublic/
Details
- Version
- 9.0.0
- License
- Apache Software License
- Python
- >=3.11
- Maintainer
- Barry Warsaw <[email protected]>
Release Cadence
Maintainers
- Barry Warsaw · [email protected]