MkPipDepTree
:fa-brands-github: Show source on GitHub
Node to display a mermaid diagram for the dependencies.¶
Example: Regular¶
graph TD
classDef missing stroke-dasharray: 5
jinja2["Jinja2<br/>3.1.6"]
markupsafe["MarkupSafe<br/>3.0.4"]
jinja2 -- ">=2.0" --> markupsafe
Bases: MkDiagram
__init__
¶
__init__(
package: ModuleType | str | None = None,
*,
direction: Literal["TD", "DT", "LR", "RL"] = "TD",
local_only: bool = False,
user_only: bool = False,
**kwargs: Any
) -> None
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package
|
ModuleType | str | None
|
Package to show a dependency diagram for |
None
|
direction
|
Literal['TD', 'DT', 'LR', 'RL']
|
diagram direction |
'TD'
|
local_only
|
bool
|
Show ony local packages |
False
|
user_only
|
bool
|
Show only user packages |
False
|
kwargs
|
Any
|
Keyword arguments passed to parent |
{}
|
| Name | Children | Inherits |
|---|---|---|
| MkDiagram mknodes.basenodes.mkdiagram Class representing a mermaid diagram. |
graph TD
570879978["mkpipdeptree.MkPipDepTree"]
1128373226["mkdiagram.MkDiagram"]
1761293797["mkcode.MkCode"]
835538629["mkcontainer.MkContainer"]
1956333208["mkcontainer.MkContainerBase"]
1359323199["mknode.MkNode"]
2751680898["builtins.object"]
1128373226 --> 570879978
1761293797 --> 1128373226
835538629 --> 1761293797
1956333208 --> 835538629
1359323199 --> 1956333208
2751680898 --> 1359323199
/home/runner/work/mknodes/mknodes/src/mknodes/templatenodes/mkpipdeptree/metadata.toml
[metadata]
name = "MkPipDepTree"
icon = "mdi:dependency"
status = "new"
group = "documentation"
[requirements.package.pipdeptree]
[examples.regular]
title = "Regular"
jinja = """
{{ "jinja2" | MkPipDepTree }}
"""
# [examples.direction]
# title = "Directed"
# jinja = """
# {{ mk.MkPipDepTree(direction="LR") }}
# """
[output.markdown]
template = """
{{ node.fence_boundary }} mermaid
{{ node.get_text() }}
{{ node.fence_boundary }}
"""