Deployment Diagram¶
c4.diagrams.deployment.DeploymentDiagram ¶
Bases: Diagram
Represents a C4 Deployment Diagram.
A deployment diagram shows how software systems and containers are mapped onto infrastructure nodes, such as servers, devices, or cloud services.
c4.diagrams.deployment.Node ¶
Bases: Boundary
Represents a deployment node in the C4 model.
A Node is a container for deployment elements and can optionally include a sprite for visual representation (e.g., server icon, cloud logo).
Nodes can be nested, and manage their own child elements.
__init__ ¶
__init__(
label: str | Required = not_provided,
description: str = "",
type_: str = "",
sprite: str = "",
tags: str = "",
link: str = "",
alias: str | EmptyStr = empty,
) -> None
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str | Required
|
Display label shown on the diagram. |
not_provided
|
description
|
str
|
Optional description shown in the rendered diagram. |
''
|
type_
|
str
|
Optional classifier for the node (e.g., "database"). |
''
|
sprite
|
str
|
Optional sprite name to visually represent the node. |
''
|
tags
|
str
|
Comma-separated list of tags for styling or filtering. |
''
|
link
|
str
|
Optional hyperlink associated with the node. |
''
|
alias
|
str | EmptyStr
|
Optional identifier for the node. |
empty
|
c4.diagrams.deployment.NodeLeft ¶
Bases: Node
Represents a deployment node aligned to the left in the diagram layout.
Typically used for directional positioning in deployment views.
c4.diagrams.deployment.NodeRight ¶
Bases: Node
Represents a deployment node aligned to the right in the diagram layout.
Useful for controlling horizontal positioning in deployment diagrams.
c4.diagrams.deployment.DeploymentNode ¶
Bases: Node
Represents a deployment-specific node in the C4 model.
Used to group containers or systems that are deployed together on a specific machine or environment (e.g., EC2 instance, on-prem server).
c4.diagrams.deployment.DeploymentNodeLeft ¶
Bases: DeploymentNode
Represents a deployment node aligned to the left in the diagram layout.
Inherits both deployment semantics and directional positioning.
c4.diagrams.deployment.DeploymentNodeRight ¶
Bases: DeploymentNode
Represents a deployment node aligned to the right in the diagram layout.
Useful for organizing infrastructure visually with directional context.