For people who come to this Post, I have found the solution and it was possible to create drawings from Python using a library called PYYED.
https://github.com/jamesscottbrown/pyyed
Python Console
from pyyed import *
g = pyyed.Graph()
g.add_node('foo', font_family="Zapfino")
g.add_node('foo2', shape="roundrectangle", font_style="bolditalic", underlined_text="true")
g.add_edge('foo1', 'foo2')
g.add_node('abc', font_size="72", height="100")
g.add_node('bar', label="Multi\nline\ntext")
g.add_node('foobar', label="""Multi
Line
Text!""")
#print g.get_graph()
z = g.get_graph()
print z
new_config_file = open("Ejemplo3" +'.graphml','w')
new_config_file.write(z)
new_config_file.close()