I have a flask app that I want to use Sphinx's autoflask directive to document a flask-restful API.
https://pythonhosted.org/sphinxcontrib-httpdomain/#module-sphinxcontrib.autohttp.flask
I have installed the module via pip and run sphinx-quickstart, which gives me a conf.py and index.rst.
I've tried putting the extension into conf.py:
extensions = ['sphinxcontrib.autohttp.flask']
and the directive into index.rst as per the documentation:
.. autoflask:: autoflask_sampleapp:app
:undos-static:
But I can't get the app:module (autoflask_sampleapp:app) part correct. As a result, when I run sphinx-build I get an error that either the app or the module are not found.
My app trees looks like this:
.
├── admin
├── apis
├── app
│ ├── static
│ └── templates
and from the app's root directory, I can say:
from apis import profile
How do I configure auto flask in the index.rst to correctly find and load my app's API modules?