Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
mkdocs-autoapi
is a MkDocs plugin that automatically generates API
documentation from your project's source code. The idea for the plugin comes
from this recipe
in the MkDocs documentation.
pip
We recommend installing this package with pip
:
pip install mkdocs-autoapi
To use the plugin, add the following configuration to your mkdocs.yml
file:
plugins:
- ... other plugin configuration ...
- mkdocs-autoapi
- mkdocstrings
By default, the plugin will use the current working directory as the project
root. If you would like to use a different directory, you can specify a value
in the project_root
configuration option:
plugins:
- ... other plugin configuration ...
- mkdocs-autoapi:
project_root: /path/to/project/root
- mkdocstrings
You can exclude files and directories from the documentation by specifying a
value in the exclude
configuration option. This option accepts a list of
glob patterns. Note that the following patterns are always excluded:
**/.venv/**/
**/venv/**/
As an example, suppose your project has the following structure:
project/
docs/
index.md
module/
__init__.py
lorem.py
ipsum.py
dolor.py
second_module/
__init__.py
lorem.py
sit.py
amet.py
venv/
mkdocs.yml
README.md
To exclude all files named lorem.py
, you can add the following configuration
to your mkdocs.yml
file:
plugins:
- ... other plugin configuration ...
- mkdocs-autoapi:
exclude:
- "**/lorem.py"
- mkdocstrings
To include the API documentation created by the plugin in your site's
navigation, you can add the following configuration to your mkdocs.yml
file:
nav:
- ... other navigation sections ...
- API Reference: autoapi/
- ... other navigation sections ...
More information on navigation configuration can be found in the MkDocs User Guide.
Again, consider the following project structure:
project/
docs/
index.md
module/
__init__.py
lorem.py
ipsum.py
dolor.py
second_module/
__init__.py
lorem.py
sit.py
amet.py
venv/
mkdocs.yml
README.md
A full mkdocs.yml
for the project might look like this:
site_name: Project
nav:
- Home: index.md
- API Reference: autoapi/
plugins:
- mkdocs-autoapi
- mkdocstrings
theme:
name: readthedocs
More information MkDocs configuration through mkdocs.yml
can be found in the
MkDocs User Guide.
Contributions are always welcome! Please submit a pull request or open an issue to get started.
This project is licensed under the MIT License. See the LICENSE file for more information.
FAQs
MkDocs plugin providing automatic API reference generation
We found that mkdocs-autoapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.