MkAPI
MkAPI is a plugin for MkDocs to generate API documentation for your Python project.
MkAPI supports two styles of docstrings: Google and NumPy. See Napoleon documentation for details.
Screenshots
Schemdraw (package tree view & package summary)
Polars (class documentation & link to source code)
Altair (table of contents)
Features
- Type annotation: If you write your function such as
def func(x: int) -> str:, you don't need write type(s) in Parameters, Returns, or Yields section again. You can override the type annotation in the corresponding docstring. - Object type inspection: MkAPI plugin creates class, dataclass, function, method, property prefix for each object.
- Docstring inheritance: Docstring of a subclass can inherit parameters and attributes description from its superclasses.
- Table of Contents: Table of contents are inserted into the documentation of each package, module, and class.
- Bidirectional Link: Bidirectional links are created between documentation and source code.
Installation
Install the MkAPI plugin using pip:
pip install mkapi
Configuration
Add the following lines to mkdocs.yml:
plugins:
- mkapi
Usage
MkAPI provides two modes to generate API documentation: Object mode and Page mode.
Object Mode
To generate the API documentation in a Markdown source, add three colons + object full name. The object can be a function, class, attribute, or module.
::: package.module.object
The Object mode is useful to embed an object documentation in an arbitrary position of a Markdown source. For more details, see Object mode.
Page Mode
Using the Page mode, you can construct a comprehensive API documentation
for your project.
You can get this powerful feature by just one line in mkdocs.yml:
nav:
- index.md
- API: $api/package.***
For more details, see Page mode.
Metadata
Release files for mkapi 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mkapi-2.1.0.tar.gz | 52.9 kB | Without provenance | Details for mkapi-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkapi-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for mkapi-2.1.0-py3-none-any.whl |
Total release size: 91.8 kB
Release files / mkapi-2.1.0.tar.gz
| Download URL | mkapi-2.1.0.tar.gz |
|---|---|
| Size | 52.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59f40f8cf91eda440d48614c2f123ac053751d306de752d17c9403789a9784ef
|
|
BLAKE2b-256 checksum How to use checksums |
298ee901926bbdef8b224932a3681467630a0dadff7a15772eb100e362de73eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.26.0
|
Release files / mkapi-2.1.0-py3-none-any.whl
| Download URL | mkapi-2.1.0-py3-none-any.whl |
|---|---|
| Size | 38.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7a65e715fa124f031496884fdc74d90c78cec23913500f3394ecd590e87a174
|
|
BLAKE2b-256 checksum How to use checksums |
4149d40cfcf4f6fc74d032adc3d75eb7566cae10174f68f5eee5d9bf4f3012bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.26.0
|
Security for mkapi 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.