Minimalist decorator for exposing public APIs in Python.
exposepy lets you declaratively define your public API using @expose and reexpose().
No more manual __all__, no more forgotten exports. Refactor-proof and clean.
pip install exposepyfrom exposepy import expose
@expose
def foo():
return 42
@expose(name="bar_alias")
def bar():
return "bar"Your module’s __all__ and dir() now only show foo and bar_alias.
from module_a import foo
from exposepy import reexpose
reexpose(foo) # Now foo is part of module_b.__all__- Refactor-proof exports
- Auto-maintained
__all__ - Cleaner introspection via patched
__dir__ - Declarative, not imperative
- Cross-module reexports with aliasing
→ https://El3ssar.github.io/exposepy
Contributions welcome!
Please see CONTRIBUTING.md for guidelines and how to get started.