Skip to main content

pymakepublic

This is rather a tiny library that allows you to explicitly mark your public Python APIs with @pub rather than creating an __all__ list and adding to or updating it whenever you change your public APIs.

This isn't necessarily PEP 844, though it's the same idea. This library leaves classes and functions that are not explicitly marked with @pub alone (assuming they are supposedly private), and you may normally underscore them to indicate they are private APIs. Note that in Python you can still import those so-called private APIs, so this library doesn't make an exception on that.

Tests PyPI Python License t

Installation and Usage

$ pip install pymakepublic
# m.py
from pymakepublic import pub


@pub
class Foo: ...


class Bar: ...


@pub
def bar(): ...


def do_something(): ...
>>> import m
>>> m.__all__
['Foo', 'bar']

This works the same as manually adding them to __all__. Hence if you use both @pub and __all__ you get a DoubleExportsError.

Why?

PEP 844's motivation isn't far off from mine. Also checkout this StackOverflow comment.

Contributing

Issues and PRs are very welcome.

LICENSE

MIT

Metadata

Release files for pymakepublic 0.2.0

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

Source distribution (sdist)

Source distribution for pymakepublic 0.2.0
File Size Uploaded Provenance Actions
pymakepublic-0.2.0.tar.gz 3.5 kB With provenance Details for pymakepublic-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 7.2 kB

Release files / pymakepublic-0.2.0.tar.gz

Download URL pymakepublic-0.2.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f6c5666e94d761fa919f485db5cfcd72600672537ca3071fcd396f3f1605c884
BLAKE2b-256 checksum
How to use checksums
38faacb8b10ea15e92c0d3fe7a1c3c93aff5965e2a2325b7e5ac64d66a790086
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / pymakepublic-0.2.0-py3-none-any.whl

Download URL pymakepublic-0.2.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c548572b3a22bf7362ae49052b00c6e6fab1d6f483eb73de910fc9aa63428da
BLAKE2b-256 checksum
How to use checksums
a808e790656fde53cae6c29b73d777e4d6b5b8ffe6e39181fd332442ed2272ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Security for pymakepublic 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pymakepublic-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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