Skip to content

Use cdk dia decorator on python project #32

@robertofd1995

Description

@robertofd1995

First of all thanks for your time on this project, it's awesome.

I would like to be able to uncollapse in the diagram the nestedStacks that I have, I would like to understand why this feature is not available on other languages rather than js/ts.

My project is on python, and even thought the laguage doesn't have the concept of interface, with jsii it can be used in the following way

from constructs import Construct
import jsii
from aws_cdk import (
    NestedStack,
    aws_ec2 as ec2,
    aws_iam as iam,
    IInspectable
)

@jsii.implements(IInspectable)
class NetworkStack(NestedStack):

    @jsii.member(jsii_name="inspect")
    def inspect(self, inspector: "TreeInspector") -> None:
        """
        :param inspector:
        :return:
        """
        # add here the logic of cdkDiaDecorator
       pass

I am unfamiliar with how to compile ts to other languages, but why is not possible to export also the logic of that decorator to other languages?

Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions