Skip to main content

@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 <barry@python.org>

Licensed under the terms of the Apache License Version 2.0. See the LICENSE file for details.

Project details

Release files for atpublic 8.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atpublic 8.0.1
File Size Uploaded
atpublic-8.0.1.tar.gz 27.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atpublic 8.0.1
File Interpreter ABI Platform
atpublic-8.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 38.5 kB

Release files / atpublic-8.0.1.tar.gz

Download URL atpublic-8.0.1.tar.gz
Size 27.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4cc00a2b8ea5645a268edc310667302fe1de2b91aba88d0bd634c0e6564f6ef4
BLAKE2b-256 checksum
How to use checksums
c2da105fb4e9e966f61eedef4cee081a99a8bf18792ad56aa64467618e8b23c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / atpublic-8.0.1-py3-none-any.whl

Download URL atpublic-8.0.1-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8696fe5b26ec7c8ea521cc8e5487495ba1d3530a9b9a9dc350c8f4f82848f77c
BLAKE2b-256 checksum
How to use checksums
98536864ee88ca91a6b1ecc0c0dff9fb6114628a416f3786e0dd80bddbce207f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

8.0.1 This release

2 release files

8.0.0

2 release files

7.0.0

2 release files

6.0.2

2 release files

6.0.1

2 release files

6.0

2 release files

5.1

2 release files

5.0

2 release files

4.1.0

2 release files

4.0

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1

2 release files

3.0.1

2 release files

3.0

2 release files

2.3

1 release file

2.2

1 release file

2.1.3

1 release file

2.1.2

1 release file

2.1.1

1 release file

2.1

1 release file

2.0

1 release file

1.0

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page