If it is only one file it does not have to be a directory. This will then let maturin generate the __init__.py file which would also include the documentation stuff.
__init__.py
from .twmap import * __doc__ = twmap.__doc__ if hasattr(twmap, "__all__"): __all__ = twmap.__all__