Skip to main content

No project description provided

Project description

sphinx-expose-init-alias

pypi Main

Generate doc of exposed stuff in __init__.py as alias

What-Is-Wanted

We sometimes do "re-expose" in __init__.py to improve experience of using our library. Such as

# lib/a.py

def foo():
  ...

# lib/__init__.py

from .a import foo

But the foo in lib/__init__.py will only occur in docs when use sphinx.ext.autodoc if we put it in the __all__ in lib/__init__.py. And wrose thing is that the content is just like a stuff defined in lib/__init__.py, which is a bit confused and duplicated.

Demo

See this repo's github pages: sphinx-expose-init-alias Docs

Usage

# docs/lib.rst

.. autoaliasmodule:: lib
  :members:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_expose_init_alias-0.2.0.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

sphinx_expose_init_alias-0.2.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page