There's an existing extension https://github.com/oruelle/md_mermaid which should support mermaid in python-markdown. Unfortunately, doesn't look like this works off the shelf - including when forking and fixing the oruelle/md_mermaid#7 identified bug. Maybe worth simply making it again from scratch, loading the JS and extra CSS using the components API.
There's an existing extension https://github.com/oruelle/md_mermaid which should support mermaid in python-markdown. Unfortunately, doesn't look like this works off the shelf - including when forking and fixing the oruelle/md_mermaid#7 identified bug. Maybe worth simply making it again from scratch, loading the JS and extra CSS using the components API.