Spaces:
Sleeping

File size: 254 Bytes
f1eaad5
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
from graphviz import Digraph

def render_er_diagram(schema_dict):
    dot = Digraph()
    for table, cols in schema_dict.items():
        col_str = "\n".join(cols)
        dot.node(table, f"{table}\n{col_str}", shape="box")
    return dot.source