Minimalist decorator for exposing public APIs
Project description
exposepy
Minimalist decorator for exposing public APIs in Python.
💡 What is this?
exposepy lets you declaratively define your public API using @expose and reexpose().
No more manual __all__, no more forgotten exports. Refactor-proof and clean.
🚀 Installation
pip install exposepy
🛠️ Basic Usage
from 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.
🔁 Cross-module Re-Export
from module_a import foo
from exposepy import reexpose
reexpose(foo) # Now foo is part of module_b.__all__
🧠 Why Use exposepy?
- Refactor-proof exports
- Auto-maintained
__all__ - Cleaner introspection via patched
__dir__ - Declarative, not imperative
- Cross-module reexports with aliasing
📚 Documentation
→ https://El3ssar.github.io/exposepy
🤝 Contributing
Contributions welcome!
Please see CONTRIBUTING.md for guidelines and how to get started.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exposepy-0.1.1.tar.gz.
File metadata
- Download URL: exposepy-0.1.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9f58a9988d87ab5f31fc7bb6407e8af5dd97fef49ba7c688eb5f749453f09a6
|
|
| MD5 |
36261d2454b87b67e4a688c1d4b523a4
|
|
| BLAKE2b-256 |
1bfe4721864e07376ac91c1548301a4a6db75057825af42f5957470fb9b93fd8
|
File details
Details for the file exposepy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: exposepy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db33452e61e5ed77a14396e2ba1d668ce63a9bdd5254265177572136bd6115cd
|
|
| MD5 |
46720f4e211699515172f34f836e4851
|
|
| BLAKE2b-256 |
226382dc9087f3b9ebfba77345f82e973ff8cc24301581c94c30901b76a6b597
|