tet.util.export module

Module export decorator utility.

This module provides a decorator that automatically maintains __all__ for a module, making it easy to control what gets exported.

Example

Using the exporter decorator:

from tet.util.export import exporter

export, __all__ = exporter()

@export
def my_public_function():
    pass

@export
class MyPublicClass:
    pass

def _private_function():
    pass

# __all__ now contains ['my_public_function', 'MyPublicClass']
tet.util.export.exporter()[source]

Create an easy export decorator with __all__

Returns:

tuple export, __all__, to be set in the module