pythonpyreverse

pyreverse classes.png only shows imports, not attributes


Hey I was trying to create a class diagram from pyreverse but it doesn't really show what I need.

I typed pyreverse -o png -p folder .

This is what I expected

enter image description here

This is what my packages.png looks like:

enter image description here

This is what the entire classes.png looks like:

enter image description here

I expected an output like the classes.png with the richness of the packages.png. What am I doing wrong? Do I need to declare something special in my Python code so that the classes and methods and ... are displayed in the packages.png? The only entry in the packages.png isn't even from my code, it's someone else's code that I've put in the folder.


Solution

  • Key was to actually "define" classes, then they'll show up

    class webserver:
        print('stuff')
    

    However, now it's missing the relationships between the classes. pyreverse doesn't draw relationships/arrows/connections