Expo
raw JSON → 0.1.2 verified Fri May 01 auth: no python
A small Python utility for selectively exposing module functionality (e.g., only exporting certain functions or classes). Current version: 0.1.2 (released August 2021). Low release cadence; no updates since initial release.
pip install expo Common errors
error AttributeError: module 'expo' has no attribute 'expose' ↓
cause The library may not be installed correctly or you are importing from the wrong package.
fix
Run 'pip install expo' and ensure no other package named 'expo' conflicts.
error ImportError: cannot import name 'expose_all' from 'expo' ↓
cause The function 'expose_all' does not exist in version 0.1.2.
fix
Use 'from expo import expose' instead; expose_all was removed in 0.1.0.
Warnings
gotcha The library has not been updated since 2021 and may have compatibility issues with newer Python versions, though it requires Python >=3.8. ↓
fix Use with caution; test in your environment.
gotcha The @expose decorator only works on module-level functions and classes; it cannot be used inside other scopes. ↓
fix Ensure you apply @expose only at the top level of your module.
Imports
- expose
from expo import expose - expose_all
from expo import expose_all
Quickstart
# mymodule.py
from expo import expose
def internal_func():
pass
@expose
def public_func():
return "Hello"