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

Release files for pymakepublic 0.1.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.1.0
File Size Uploaded
pymakepublic-0.1.0.tar.gz 3.5 kB Details

Built distribution (wheel)

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

Total release size: 7.2 kB

Release files / pymakepublic-0.1.0.tar.gz

Download URL pymakepublic-0.1.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7365cd937a6bfb629184fdee85e41b9f18c7ab50cd05c74464a09d4966348a1f
BLAKE2b-256 checksum
How to use checksums
27ce5e64f1f0ff516b9941520b295b1f44cf69ba152023a3c5cc4a78989a9adc
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 Sep 22, 2026.

Transparency log

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

Download URL pymakepublic-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3afc71a37807c2429bc4a94f13d5819eb593745eb1515f6c3cc9fae9b15121d9
BLAKE2b-256 checksum
How to use checksums
8cef63aafc2d3dc2881fd7ba59d8a0b3659fe946725ea0af76c2e2d582f820b2
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 Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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