daizutabi / mkapi

A plugin for MkDocs to generate API documentation
https://daizutabi.github.io/mkapi/
MIT License
94 stars 19 forks source link

Support imports in `__init__.py` instead of full paths to objects #101

Closed frazane closed 7 months ago

frazane commented 7 months ago

In my package all functions are accessible from the main namespace by importing them in the __init__.py file (see https://github.com/frazane/scoringrules/blob/main/scoringrules/__init__.py). However, when I use e.g. ::: scoringrules.brier_score in the markdown files I get an error ('scoringrules.brier_score' not found). On the other hand, ::: scoringrules._brier.brier_score works.

It would be great if one could use the same namespaces as defined by the public API instead of having to write the full paths.

daizutabi commented 7 months ago

It's possible. The feature will be implemented in the next version.